update @路由跳转 列表详情接口对接
|
@ -16,5 +16,6 @@ module.exports = {
|
|||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'@typescript-eslint/no-this-alias': 'off',
|
||||
"no-undef": "off"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,9 +4,10 @@ const { DefinePlugin } = require('webpack');
|
|||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||
const AutoImport = require('unplugin-auto-import/webpack')
|
||||
const Components = require('unplugin-vue-components/webpack')
|
||||
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')
|
||||
const { VantResolver } = require('@vant/auto-import-resolver');
|
||||
const AutoImport = require('unplugin-auto-import/webpack');
|
||||
const Components = require('unplugin-vue-components/webpack');
|
||||
|
||||
|
||||
module.exports = {
|
||||
entry: path.join(__dirname, '../src/main.ts'), // 入口文件
|
||||
|
@ -67,7 +68,7 @@ module.exports = {
|
|||
dirs: [
|
||||
path.resolve(__dirname, "../src"),
|
||||
],
|
||||
resolvers: [ElementPlusResolver()],
|
||||
resolvers: [VantResolver()],
|
||||
dts: path.resolve(__dirname, "../src/auto-imports.d.ts"),
|
||||
// eslintrc: {
|
||||
// enabled: true,
|
||||
|
@ -76,7 +77,7 @@ module.exports = {
|
|||
// },
|
||||
}),
|
||||
Components({
|
||||
resolvers: [ElementPlusResolver()],
|
||||
resolvers: [VantResolver()],
|
||||
dts: path.resolve(__dirname, "../src/components.d.ts"),
|
||||
}),
|
||||
],
|
||||
|
@ -100,7 +101,7 @@ module.exports = {
|
|||
// 如果用的是pnpm 就暂时不要配置这个,会有幽灵依赖的问题,访问不到很多模块
|
||||
// 查找第三方模块只在本项目的node_modules中查找
|
||||
modules: [path.resolve(__dirname, '../node_modules')],
|
||||
extensions: ['.vue', '.ts', '.js', '.json'],
|
||||
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
|
||||
alias: {
|
||||
'@': path.join(__dirname, '../src')
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const { merge } = require('webpack-merge')
|
||||
const baseConfig = require('./webpack.base.js')
|
||||
|
||||
const VITE_BASE_URL = 'http://192.168.110.126:8090'; // 樊波
|
||||
const VITE_BASE_URL = 'http://192.168.110.126:8099'; // 樊波
|
||||
// const VITE_BASE_URL = 'http://120.55.12.245:8090'; // 测试-公网
|
||||
// const VITE_BASE_URL = 'https://scens.admin.86698.cn'; // 正式地址
|
||||
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
"dependencies": {
|
||||
"axios": "^1.7.5",
|
||||
"core-js": "^3.8.3",
|
||||
"element-plus": "^2.2.19",
|
||||
"swiper": "^8.4.7",
|
||||
"vue": "^3.2.13",
|
||||
"vue-awesome-swiper": "^5.0.1",
|
||||
"vue-router": "^4.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -21,6 +22,7 @@
|
|||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
"@vant/auto-import-resolver": "^1.2.1",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-plugin-router": "~5.0.0",
|
||||
|
@ -45,9 +47,9 @@
|
|||
"thread-loader": "^4.0.2",
|
||||
"typescript": "~4.5.5",
|
||||
"unplugin-auto-import": "^0.11.4",
|
||||
"unplugin-element-plus": "^0.7.0",
|
||||
"unplugin-vue-components": "^0.22.9",
|
||||
"url-loader": "^4.1.1",
|
||||
"vant": "^4.9.4",
|
||||
"vue-class-component": "^8.0.0-0",
|
||||
"vue-loader": "^17.4.2",
|
||||
"vue-style-loader": "^4.1.3",
|
||||
|
@ -1884,14 +1886,6 @@
|
|||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@ctrl/tinycolor": {
|
||||
"version": "3.6.1",
|
||||
"resolved": "https://registry.npmmirror.com/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz",
|
||||
"integrity": "sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@discoveryjs/json-ext": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmmirror.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz",
|
||||
|
@ -1901,14 +1895,6 @@
|
|||
"node": ">=10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@element-plus/icons-vue": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz",
|
||||
"integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==",
|
||||
"peerDependencies": {
|
||||
"vue": "^3.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint-community/eslint-utils": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
|
||||
|
@ -1989,28 +1975,6 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/@floating-ui/core": {
|
||||
"version": "1.6.7",
|
||||
"resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.6.7.tgz",
|
||||
"integrity": "sha512-yDzVT/Lm101nQ5TCVeK65LtdN7Tj4Qpr9RTXJ2vPFLqtLxwOrpoxAHAJI8J3yYWUc40J0BDBheaitK5SJmno2g==",
|
||||
"dependencies": {
|
||||
"@floating-ui/utils": "^0.2.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@floating-ui/dom": {
|
||||
"version": "1.6.10",
|
||||
"resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.6.10.tgz",
|
||||
"integrity": "sha512-fskgCFv8J8OamCmyun8MfjB1Olfn+uZKjOKZ0vhYF3gRmEUXcGOjxWL8bBr7i4kIuPZ2KD2S3EUIOxnjC8kl2A==",
|
||||
"dependencies": {
|
||||
"@floating-ui/core": "^1.6.0",
|
||||
"@floating-ui/utils": "^0.2.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@floating-ui/utils": {
|
||||
"version": "0.2.7",
|
||||
"resolved": "https://registry.npmmirror.com/@floating-ui/utils/-/utils-0.2.7.tgz",
|
||||
"integrity": "sha512-X8R8Oj771YRl/w+c1HqAC1szL8zWQRwFvgDwT129k9ACdBoud/+/rX9V0qiMl6LWUdP9voC2nDVZYPMQQsb6eA=="
|
||||
},
|
||||
"node_modules/@hapi/hoek": {
|
||||
"version": "9.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/@hapi/hoek/-/hoek-9.3.0.tgz",
|
||||
|
@ -2423,16 +2387,6 @@
|
|||
"integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@popperjs/core": {
|
||||
"name": "@sxzz/popperjs-es",
|
||||
"version": "2.11.7",
|
||||
"resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
|
||||
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/popperjs"
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/pluginutils": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.1.0.tgz",
|
||||
|
@ -2711,19 +2665,6 @@
|
|||
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/lodash": {
|
||||
"version": "4.17.7",
|
||||
"resolved": "https://registry.npmmirror.com/@types/lodash/-/lodash-4.17.7.tgz",
|
||||
"integrity": "sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA=="
|
||||
},
|
||||
"node_modules/@types/lodash-es": {
|
||||
"version": "4.17.12",
|
||||
"resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz",
|
||||
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
|
||||
"dependencies": {
|
||||
"@types/lodash": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/mime": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmmirror.com/@types/mime/-/mime-1.3.5.tgz",
|
||||
|
@ -2832,7 +2773,10 @@
|
|||
"node_modules/@types/web-bluetooth": {
|
||||
"version": "0.0.16",
|
||||
"resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz",
|
||||
"integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ=="
|
||||
"integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/webpack-env": {
|
||||
"version": "1.18.5",
|
||||
|
@ -3088,6 +3032,27 @@
|
|||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@vant/auto-import-resolver": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/@vant/auto-import-resolver/-/auto-import-resolver-1.2.1.tgz",
|
||||
"integrity": "sha512-czGWW4UolNITkF3qQSQlpHDHAsI3/GHVKbRMmEEpry7NWdnU4p5a5jBi0VApbaLa5g80Hy10XVs3IB+UozoSUw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@vant/popperjs": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz",
|
||||
"integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@vant/use": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmmirror.com/@vant/use/-/use-1.6.0.tgz",
|
||||
"integrity": "sha512-PHHxeAASgiOpSmMjceweIrv2AxDZIkWXyaczksMoWvKV2YAYEhoizRuk/xFnKF+emUIi46TsQ+rvlm/t2BBCfA==",
|
||||
"dev": true,
|
||||
"peerDependencies": {
|
||||
"vue": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/babel-helper-vue-jsx-merge-props": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz",
|
||||
|
@ -4624,6 +4589,9 @@
|
|||
"version": "9.13.0",
|
||||
"resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-9.13.0.tgz",
|
||||
"integrity": "sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/web-bluetooth": "^0.0.16",
|
||||
"@vueuse/metadata": "9.13.0",
|
||||
|
@ -4638,7 +4606,10 @@
|
|||
"version": "0.14.10",
|
||||
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.10.tgz",
|
||||
"integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"vue-demi-fix": "bin/vue-demi-fix.js",
|
||||
"vue-demi-switch": "bin/vue-demi-switch.js"
|
||||
|
@ -4663,6 +4634,9 @@
|
|||
"version": "9.13.0",
|
||||
"resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-9.13.0.tgz",
|
||||
"integrity": "sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
}
|
||||
|
@ -4671,6 +4645,9 @@
|
|||
"version": "9.13.0",
|
||||
"resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-9.13.0.tgz",
|
||||
"integrity": "sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"vue-demi": "*"
|
||||
},
|
||||
|
@ -4682,7 +4659,10 @@
|
|||
"version": "0.14.10",
|
||||
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.10.tgz",
|
||||
"integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"vue-demi-fix": "bin/vue-demi-fix.js",
|
||||
"vue-demi-switch": "bin/vue-demi-switch.js"
|
||||
|
@ -5165,11 +5145,6 @@
|
|||
"lodash": "^4.17.14"
|
||||
}
|
||||
},
|
||||
"node_modules/async-validator": {
|
||||
"version": "4.2.5",
|
||||
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz",
|
||||
"integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg=="
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
|
||||
|
@ -7124,11 +7099,6 @@
|
|||
"resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz",
|
||||
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="
|
||||
},
|
||||
"node_modules/dayjs": {
|
||||
"version": "1.11.13",
|
||||
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
|
||||
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
|
||||
},
|
||||
"node_modules/de-indent": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/de-indent/-/de-indent-1.0.2.tgz",
|
||||
|
@ -7428,6 +7398,14 @@
|
|||
"url": "https://github.com/fb55/entities?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/dom7": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmmirror.com/dom7/-/dom7-4.0.6.tgz",
|
||||
"integrity": "sha512-emjdpPLhpNubapLFdjNL9tP06Sr+GZkrIHEXLWvOGsytACUrkbeIdjO5g77m00BrHTznnlcNqgmn7pCN192TBA==",
|
||||
"dependencies": {
|
||||
"ssr-window": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/domelementtype": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/domelementtype/-/domelementtype-2.3.0.tgz",
|
||||
|
@ -7527,31 +7505,6 @@
|
|||
"integrity": "sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/element-plus": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.8.1.tgz",
|
||||
"integrity": "sha512-p11/6w/O0+hGvPhiN3jrcgh+XG+eg5jZlLdQVYvcPHZYhhCh3J3YeZWW1JO/REPES1vevkboT6VAi+9wHA8Dsg==",
|
||||
"dependencies": {
|
||||
"@ctrl/tinycolor": "^3.4.1",
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@floating-ui/dom": "^1.0.1",
|
||||
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
|
||||
"@types/lodash": "^4.14.182",
|
||||
"@types/lodash-es": "^4.17.6",
|
||||
"@vueuse/core": "^9.1.0",
|
||||
"async-validator": "^4.2.5",
|
||||
"dayjs": "^1.11.3",
|
||||
"escape-html": "^1.0.3",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash-es": "^4.17.21",
|
||||
"lodash-unified": "^1.0.2",
|
||||
"memoize-one": "^6.0.0",
|
||||
"normalize-wheel-es": "^1.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^3.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
|
@ -7709,7 +7662,8 @@
|
|||
"node_modules/escape-html": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz",
|
||||
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
|
||||
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
|
@ -10303,22 +10257,8 @@
|
|||
"node_modules/lodash": {
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
||||
},
|
||||
"node_modules/lodash-es": {
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
|
||||
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
|
||||
},
|
||||
"node_modules/lodash-unified": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/lodash-unified/-/lodash-unified-1.0.3.tgz",
|
||||
"integrity": "sha512-WK9qSozxXOD7ZJQlpSqOT+om2ZfcT4yO+03FuzAHD0wF6S0l0090LRPDx3vhTTLZ8cFKpBn+IOcVXK6qOcIlfQ==",
|
||||
"peerDependencies": {
|
||||
"@types/lodash-es": "*",
|
||||
"lodash": "*",
|
||||
"lodash-es": "*"
|
||||
}
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/lodash.debounce": {
|
||||
"version": "4.0.8",
|
||||
|
@ -10638,11 +10578,6 @@
|
|||
"node": ">= 4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/memoize-one": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz",
|
||||
"integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw=="
|
||||
},
|
||||
"node_modules/merge-descriptors": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
||||
|
@ -11024,11 +10959,6 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-wheel-es": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/normalize-wheel-es/-/normalize-wheel-es-1.2.0.tgz",
|
||||
"integrity": "sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw=="
|
||||
},
|
||||
"node_modules/npm-run-path": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
||||
|
@ -13405,6 +13335,11 @@
|
|||
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/ssr-window": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/ssr-window/-/ssr-window-4.0.2.tgz",
|
||||
"integrity": "sha512-ISv/Ch+ig7SOtw7G2+qkwfVASzazUnvlDTwypdLoPoySv+6MqlOV10VwPSE6EWkGjhW50lUmghPmpYZXMu/+AQ=="
|
||||
},
|
||||
"node_modules/ssri": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/ssri/-/ssri-8.0.1.tgz",
|
||||
|
@ -13629,6 +13564,29 @@
|
|||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/swiper": {
|
||||
"version": "8.4.7",
|
||||
"resolved": "https://registry.npmmirror.com/swiper/-/swiper-8.4.7.tgz",
|
||||
"integrity": "sha512-VwO/KU3i9IV2Sf+W2NqyzwWob4yX9Qdedq6vBtS0rFqJ6Fa5iLUJwxQkuD4I38w0WDJwmFl8ojkdcRFPHWD+2g==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/swiperjs"
|
||||
},
|
||||
{
|
||||
"type": "open_collective",
|
||||
"url": "http://opencollective.com/swiper"
|
||||
}
|
||||
],
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"dom7": "^4.0.4",
|
||||
"ssr-window": "^4.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 4.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/table": {
|
||||
"version": "6.8.2",
|
||||
"resolved": "https://registry.npmmirror.com/table/-/table-6.8.2.tgz",
|
||||
|
@ -14270,21 +14228,6 @@
|
|||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/unplugin-element-plus": {
|
||||
"version": "0.7.2",
|
||||
"resolved": "https://registry.npmmirror.com/unplugin-element-plus/-/unplugin-element-plus-0.7.2.tgz",
|
||||
"integrity": "sha512-A73dCu0fIMRodx1OoAZ4JruyAoenzTVFWMdukq3q7xR+vtcAy3B9uO1g3+WJMA1A9hWxo7iO5tVRGaD2lFNlWA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@rollup/pluginutils": "^5.0.2",
|
||||
"es-module-lexer": "^1.3.0",
|
||||
"magic-string": "^0.30.1",
|
||||
"unplugin": "^1.3.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.0"
|
||||
}
|
||||
},
|
||||
"node_modules/unplugin-vue-components": {
|
||||
"version": "0.22.12",
|
||||
"resolved": "https://registry.npmmirror.com/unplugin-vue-components/-/unplugin-vue-components-0.22.12.tgz",
|
||||
|
@ -14501,6 +14444,20 @@
|
|||
"spdx-expression-parse": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/vant": {
|
||||
"version": "4.9.4",
|
||||
"resolved": "https://registry.npmmirror.com/vant/-/vant-4.9.4.tgz",
|
||||
"integrity": "sha512-dUu3yopMf2a6MkrdBWxGfDIcHmSs/ULgvBkBcfK8gE29QZ/A6kFyhnUzcMU2yklMGUUwAygzx44TPEfhp7hkfQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vant/popperjs": "^1.3.0",
|
||||
"@vant/use": "^1.6.0",
|
||||
"@vue/shared": "^3.4.33"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/vary": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz",
|
||||
|
@ -14530,6 +14487,15 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/vue-awesome-swiper": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/vue-awesome-swiper/-/vue-awesome-swiper-5.0.1.tgz",
|
||||
"integrity": "sha512-mWjFJzUqA4lG+DmsmibvMpoiBnl+IH2SSeiiQ3i5M0t1y9FknTxnGT0DsMb2YdJLgjYMEK3sYOWzqgLnZMH8Lg==",
|
||||
"peerDependencies": {
|
||||
"swiper": "^7.0.0 || ^8.0.0",
|
||||
"vue": "3.x"
|
||||
}
|
||||
},
|
||||
"node_modules/vue-class-component": {
|
||||
"version": "8.0.0-rc.1",
|
||||
"resolved": "https://registry.npmmirror.com/vue-class-component/-/vue-class-component-8.0.0-rc.1.tgz",
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
"dependencies": {
|
||||
"axios": "^1.7.5",
|
||||
"core-js": "^3.8.3",
|
||||
"element-plus": "^2.2.19",
|
||||
"swiper": "^8.4.7",
|
||||
"vue": "^3.2.13",
|
||||
"vue-awesome-swiper": "^5.0.1",
|
||||
"vue-router": "^4.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -22,6 +23,7 @@
|
|||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
"@vant/auto-import-resolver": "^1.2.1",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-plugin-router": "~5.0.0",
|
||||
|
@ -46,9 +48,9 @@
|
|||
"thread-loader": "^4.0.2",
|
||||
"typescript": "~4.5.5",
|
||||
"unplugin-auto-import": "^0.11.4",
|
||||
"unplugin-element-plus": "^0.7.0",
|
||||
"unplugin-vue-components": "^0.22.9",
|
||||
"url-loader": "^4.1.1",
|
||||
"vant": "^4.9.4",
|
||||
"vue-class-component": "^8.0.0-0",
|
||||
"vue-loader": "^17.4.2",
|
||||
"vue-style-loader": "^4.1.3",
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> -->
|
||||
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,viewport-fit=cover" />
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
import request from "@/utils/request";
|
||||
|
||||
export enum Api {
|
||||
// 登录
|
||||
LOGIN = "/v1/user/login",
|
||||
// 商品查询
|
||||
QUERY = "/v1/goods/list/key",
|
||||
// 模板查询
|
||||
GET_THEME = "/v1/theme",
|
||||
}
|
||||
|
||||
|
||||
export const LOGIN = (data?: any) => request.post(Api.LOGIN, data);
|
||||
|
||||
export const QUERY = (data?: any) => request.get(Api.QUERY, data);
|
||||
|
||||
export const GET_THEME = (data?: any) => request.get(Api.GET_THEME, data);
|
|
@ -1,39 +1,119 @@
|
|||
import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
|
||||
import { LOGIN, QUERY } from "@/router/api";
|
||||
|
||||
const routes = [
|
||||
// 公共路由
|
||||
const routePublic = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component: () => import('../views/cmsList/index.vue')
|
||||
// 商品中转(空白页)
|
||||
path: '/proTransfer',
|
||||
name: 'proTransfer',
|
||||
component: () => {}
|
||||
},
|
||||
{
|
||||
path: '/list',
|
||||
name: 'list',
|
||||
component: () => import('../views/cmsList/index.vue')
|
||||
// 中转失败页
|
||||
path: '/transferError',
|
||||
name: 'transferError',
|
||||
component: () => import('../views/transferError.vue')
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
// 模版路由 命名:cmsXXX
|
||||
// 需要:类组件开发、样式外部 index.scss 文件引入(禁用 vh,fixed 窗口相关样式)
|
||||
const routeTemplate = [
|
||||
{
|
||||
// 商品列表模版
|
||||
path: '/cmsList',
|
||||
name: 'cmsList',
|
||||
component: () => import('@/views/templates/cmsList/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/detail',
|
||||
name: 'detail',
|
||||
component: () => import('../views/cmsDetail/index.vue')
|
||||
// 商品详情模版
|
||||
path: '/cmsDetail',
|
||||
name: 'cmsDetail',
|
||||
component: () => import('@/views/templates/cmsDetail/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/cmsCash',
|
||||
name: 'cmsCash',
|
||||
component: () => import('@/views/templates/cmsCash/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/cmsVoucher',
|
||||
name: 'cmsVoucher',
|
||||
component: () => import('@/views/templates/cmsVoucher/index.vue')
|
||||
}
|
||||
];
|
||||
|
||||
// H5 路由
|
||||
const routePage = [
|
||||
{
|
||||
// 组合商品页
|
||||
path: '/comProduct',
|
||||
name: 'comProduct',
|
||||
component: () => import('../views/comProduct/index.vue')
|
||||
component: () => import('../views/pages/comProduct/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/cash',
|
||||
component: () => import('../views/cash/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/voucher',
|
||||
component: () => import('../views/voucher/index.vue')
|
||||
}
|
||||
]
|
||||
|
||||
const routes= [ ...routePublic, ...routeTemplate, ...routePage ];
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes
|
||||
})
|
||||
|
||||
export default router
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
if (to.path === '/proTransfer') { // 商品中转
|
||||
// console.log('---proTransfer-router.beforeEach---', to, from);
|
||||
try {
|
||||
const key = to.query.key || 'rPBVzOCs0FN4P7jNMqHo5IVfb0oaAyigbfNBmCKnavs=';
|
||||
const res = await LOGIN({ key: key }); // 请求 token
|
||||
if (res && res.code === 200) {
|
||||
res.data.Token =
|
||||
"admingL_q2QjDlD_MdeU11q5ILoeLFEqhbGBtcEptfs-OHzI53vbrgX9GFCh-SB4fSJBGwgSTl.uDPUoyiPjJ2O6e7zUBzExUUXhsdnPxtyLwncYc8.vy9ikZRp-wUba2POZJlTERJxnLbK6DzpQFQTxuYfcNM_yl3Avo7hgCjkS-ot5QgzNiO5TE";
|
||||
if (res.data.Token) {
|
||||
localStorage.setItem('token', res.data.Token);
|
||||
const resList = await QUERY({ key: key }) // 根据商品判断 跳转指定路由
|
||||
if (resList && resList.code === 200) {
|
||||
localStorage.setItem('key', String(key));
|
||||
sessionStorage.removeItem('transferError_page_identify');
|
||||
if (resList.data.length !== 1) {
|
||||
sessionStorage.setItem('transferProListData', JSON.stringify(resList.data));
|
||||
return next({
|
||||
path: '/cmsList',
|
||||
query: { key: key }
|
||||
}); // 商品列表
|
||||
} else {
|
||||
const pro = resList.data[0]
|
||||
if (pro.goods.group_id) {
|
||||
return next({
|
||||
path: '/comProduct',
|
||||
query: { group_id: pro.goods.group_id }
|
||||
}); // 组合商品
|
||||
} else {
|
||||
// todo 3 种商品的详情页
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
showToast('登录失败');
|
||||
}
|
||||
} else {
|
||||
showToast(res.message);
|
||||
}
|
||||
next({
|
||||
path: '/transferError',
|
||||
query: { redirect: to.fullPath }
|
||||
});
|
||||
} catch (error) {
|
||||
next({
|
||||
path: '/transferError',
|
||||
query: { redirect: to.fullPath }
|
||||
});
|
||||
}
|
||||
} else {
|
||||
next(); // 对于非匹配路由,直接放行
|
||||
}
|
||||
})
|
||||
|
||||
export default router;
|
||||
|
|
|
@ -33,6 +33,7 @@ const service: AxiosInstance = axios.create({
|
|||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
service.interceptors.request.use((config: AxiosRequestConfig) => {
|
||||
// const token = localStorage.getItem("token");
|
||||
const token =
|
||||
"admingL_q2QjDlD_MdeU11q5ILoeLFEqhbGBtcEptfs-OHzI53vbrgX9GFCh-SB4fSJBGwgSTl.uDPUoyiPjJ2O6e7zUBzExUUXhsdnPxtyLwncYc8.vy9ikZRp-wUba2POZJlTERJxnLbK6DzpQFQTxuYfcNM_yl3Avo7hgCjkS-ot5QgzNiO5TE";
|
||||
if (token) {
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
// 仅在单独打包时候使用
|
||||
import '../../global.css'; // 添加全局样式
|
||||
import cmsDetail from './index.vue';
|
||||
|
||||
export default cmsDetail;
|
|
@ -1,5 +0,0 @@
|
|||
// 仅在单独打包时候使用
|
||||
import '../../global.css';// 添加全局样式
|
||||
import cmsList from './index.vue';
|
||||
|
||||
export default cmsList;
|
|
@ -1,115 +0,0 @@
|
|||
<template>
|
||||
<div class="cmsListWrapper">
|
||||
<img @click="jumpBanner" class="bannerTop" :src="cssData.bannerTop[0].url" alt="">
|
||||
<div class="content">
|
||||
<div v-if="cssData.contentType === 1" class="carouselBox">
|
||||
<img class="carouselImg" :src="cssData.carouselImg" alt="">
|
||||
</div>
|
||||
<ul v-if="cssData.contentType === 2" class="contentList">
|
||||
<template v-for="(item, index) in (!pageData ? cssData.defaultList : pageData)" :key="index">
|
||||
<li v-if="!pageData">
|
||||
<img class="defaultListImg" :src="cssData.defaultListImg" alt="">
|
||||
</li>
|
||||
<li v-else>{{ item }}</li>
|
||||
</template>
|
||||
</ul>
|
||||
<ul v-if="cssData.contentType === 3" class="contentMatrix">
|
||||
<template v-for="(item, index) in (!pageData ? cssData.defaultMatrix : pageData)" :key="index">
|
||||
<li v-if="!pageData">
|
||||
<img class="defaultMatrixImg" :src="cssData.defaultMatrixImg" alt="">
|
||||
</li>
|
||||
<li v-else>{{ item }}</li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn" :style="{ color: cssData.btnColor, backgroundColor: cssData.btnBgc }">立即兑换</div>
|
||||
<img v-if="cssData.activityDescType === 1 && cssData.bottomImg.length" class="bottomImg" :src="cssData.bottomImg[0].url" alt="">
|
||||
<img v-if="cssData.activityDescType === 2 && cssData.floatImg" @click="changePopComStatus" class="floatImg" :src="cssData.floatImg" alt="">
|
||||
<div v-if="cssData.activityDescType === 3 && cssData.floatText" class="description-3" v-html="cssData.floatText" />
|
||||
|
||||
<div v-if="popComStatus" class="popWrapper">
|
||||
<img @click="changePopComStatus" class="backImg" src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
|
||||
<p class="title">活动规则</p>
|
||||
<div v-if="cssData.floatText" class="description-2" v-html="cssData.floatText"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import "./index.scss";
|
||||
import config from "./config";
|
||||
|
||||
export default {
|
||||
name: 'cmsList',
|
||||
props: {
|
||||
comType: {
|
||||
type: Number,
|
||||
default: 1, // 1 配置页 2 H5
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return {}
|
||||
} // 配置表单
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageData: null,
|
||||
cssData: {
|
||||
bannerUrl: '',
|
||||
bannerTop: [{ name: '', url: 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/goodstop.png'}],
|
||||
btnColor: 'rgb(255, 255, 255)',
|
||||
btnBgc: 'rgb(250, 205, 106)',
|
||||
contentType: 1, // 样式:1 轮播 2 列表 3 矩阵
|
||||
activityDescType: 1, //活动说明:1 图片 2 悬浮 3 富文本
|
||||
bottomImg: [] as Array<any>,
|
||||
floatImg: 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/acticeTextTip.png',
|
||||
floatText: '',
|
||||
|
||||
carouselImg: 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/swiper.png',
|
||||
defaultList: [1, 2, 3, 4, 5],
|
||||
defaultListImg: 'https://lsxdmgoss.oss-cn-chengdu.aliyuncs.com/MarketingSystem/image/uploads/2024-08-20/A89BB503-00DC-456e-B757-CA04ADFA9C06.png',
|
||||
defaultMatrix: [1, 2, 3, 4, 5, 6],
|
||||
defaultMatrixImg: 'https://lsxdmgoss.oss-cn-chengdu.aliyuncs.com/MarketingSystem/image/uploads/2024-08-20/0338CC5C-D9FD-4f9d-B65C-DCAB50F2FAA7.png',
|
||||
},
|
||||
popComStatus: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
console.log('---detail-created---', config);
|
||||
this.$emit('getDefault', config);
|
||||
},
|
||||
watch: {
|
||||
formData: {
|
||||
handler(newVal) {
|
||||
console.log('---detail-watch---', newVal);
|
||||
this.cssData = {
|
||||
...this.cssData,
|
||||
...newVal
|
||||
}
|
||||
},
|
||||
deep:true
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
changePopComStatus() {
|
||||
this.popComStatus = !this.popComStatus;
|
||||
},
|
||||
jumpBanner() {
|
||||
console.log('jumpBanner');
|
||||
if (this.cssData.bannerUrl) {
|
||||
location.href = this.cssData.bannerUrl;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.boxBoxy {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: aqua;
|
||||
}
|
||||
</style>
|
|
@ -2,7 +2,7 @@ import request from "@/utils/request";
|
|||
|
||||
export enum Api {
|
||||
// 列表
|
||||
ACTIVITY_QUERY = "/admin/v1/activity/list",
|
||||
ACTIVITY_QUERY = "/v1/goods/list",
|
||||
}
|
||||
|
||||
export const PLUGIN_QUERY = (data?: any) => request.get(Api.ACTIVITY_QUERY, data);
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 503 B After Width: | Height: | Size: 503 B |
Before Width: | Height: | Size: 498 B After Width: | Height: | Size: 498 B |
Before Width: | Height: | Size: 484 B After Width: | Height: | Size: 484 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
@ -130,8 +130,7 @@ export default {
|
|||
},
|
||||
async created() {
|
||||
const res = await PLUGIN_QUERY({
|
||||
page: 1,
|
||||
limit: 10
|
||||
key: 'rPBVzOCs0FN4P7jNMqHo5IVfb0oaAyigbfNBmCKnavs='
|
||||
});
|
||||
console.log('---created---');
|
||||
document.title = '组合商品';
|
|
@ -1,3 +1,6 @@
|
|||
.loading {
|
||||
margin-top: 200px;
|
||||
}
|
||||
.cmsDetailWrapper {
|
||||
width: 375px;
|
||||
min-height: 667px;
|
|
@ -0,0 +1,5 @@
|
|||
// 仅在单独打包时候使用
|
||||
import '../../../global.css'; // 添加全局样式
|
||||
import cmsDetail from './index.vue';
|
||||
|
||||
export default cmsDetail;
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<div class="cmsDetailWrapper">
|
||||
<van-loading class="loading" v-if="loadingStatus" size="24px" color="#0094ff" vertical>加载中...</van-loading>
|
||||
<div v-else class="cmsDetailWrapper">
|
||||
<div class="carousel">
|
||||
<img class="carouselBg" :src="cssData.carouselImg" alt="">
|
||||
</div>
|
||||
|
@ -29,13 +30,14 @@
|
|||
<script lang="ts">
|
||||
import "./index.scss";
|
||||
import config from "./config";
|
||||
import { QUERY, GET_THEME } from "@/router/api";
|
||||
|
||||
export default {
|
||||
name: 'cmsDetail',
|
||||
props: {
|
||||
comType: {
|
||||
type: Number,
|
||||
default: 1, // 1 配置页 2 H5
|
||||
default: 1, // 1 H5 2 配置页
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
|
@ -46,6 +48,8 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
loadingStatus: false,
|
||||
key: this.$route.query.key || localStorage.getItem("key"),
|
||||
pageData: null,
|
||||
cssData: {
|
||||
btnColor: 'rgb(255, 255, 255)',
|
||||
|
@ -65,8 +69,11 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
console.log('---detail-created---', config);
|
||||
if (this.$props.comType === 1) {
|
||||
this.getData()
|
||||
} else {
|
||||
this.$emit('getDefault', config);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
formData: {
|
||||
|
@ -84,6 +91,41 @@ export default {
|
|||
changePopComStatus() {
|
||||
this.popComStatus = !this.popComStatus;
|
||||
},
|
||||
async getData() {
|
||||
this.loadingStatus = true;
|
||||
if (sessionStorage.getItem('transferProDetailData')) {
|
||||
const data = JSON.parse(sessionStorage.getItem('transferProDetailData') || '');
|
||||
this.pageData = { ...data };
|
||||
console.log('---this.pageData---', this.pageData);
|
||||
await this.getCss(data.goods.theme_goods_detail_id);
|
||||
} else {
|
||||
const res = await QUERY({ key: this.key, id: this.$route.query.id });
|
||||
if (res && res.code === 200) {
|
||||
if (res.data.length) {
|
||||
this.pageData = { ...res.data[0] };
|
||||
console.log('---this.pageData---', this.pageData);
|
||||
await this.getCss(res.data[0].goods.theme_goods_detail_id);
|
||||
} else {
|
||||
showToast('商品数据为空');
|
||||
}
|
||||
} else {
|
||||
showToast(res.message);
|
||||
}
|
||||
}
|
||||
},
|
||||
async getCss(id: number | string) {
|
||||
const res = await GET_THEME({ id: id });
|
||||
if (res && res.code === 200) {
|
||||
console.log('---getCss---', res.data.config);
|
||||
this.cssData = {
|
||||
...this.cssData,
|
||||
...JSON.parse(res.data.config)
|
||||
};
|
||||
this.loadingStatus = false;
|
||||
} else {
|
||||
showToast(res.message);
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,8 @@
|
|||
import request from "@/utils/request";
|
||||
|
||||
export enum Api {
|
||||
// 列表
|
||||
GET_THEME = "/v1/theme",
|
||||
}
|
||||
|
||||
export const GET_THEME = (data?: any) => request.get(Api.GET_THEME, data);
|
|
@ -1,3 +1,6 @@
|
|||
.loading {
|
||||
margin-top: 200px;
|
||||
}
|
||||
.cmsListWrapper {
|
||||
width: 375px;
|
||||
height: 667px;
|
||||
|
@ -37,6 +40,11 @@
|
|||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.contentListLi {
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
min-height: 60px;
|
||||
}
|
||||
}
|
||||
.contentMatrix {
|
||||
padding: 10px;
|
||||
|
@ -52,6 +60,9 @@
|
|||
height: auto;
|
||||
}
|
||||
}
|
||||
.contentMatrixLi {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn {
|
|
@ -0,0 +1,5 @@
|
|||
// 仅在单独打包时候使用
|
||||
import '../../../global.css';// 添加全局样式
|
||||
import cmsList from './index.vue';
|
||||
|
||||
export default cmsList;
|
|
@ -0,0 +1,197 @@
|
|||
<template>
|
||||
<van-loading class="loading" v-if="loadingStatus" size="24px" color="#0094ff" vertical>加载中...</van-loading>
|
||||
<div v-else class="cmsListWrapper">
|
||||
<img @click="jumpBanner" class="bannerTop" :src="cssData.bannerTop[0].url" alt="">
|
||||
<div class="content">
|
||||
<div v-if="cssData.contentType === 1" class="carouselBox">
|
||||
<img class="carouselImg" :src="cssData.carouselImg" alt="">
|
||||
</div>
|
||||
<ul v-if="cssData.contentType === 2" class="contentList">
|
||||
<template v-for="(item, index) in (!pageData ? cssData.defaultList : pageData)" :key="index">
|
||||
<li v-if="!pageData">
|
||||
<img class="defaultListImg" :src="cssData.defaultListImg" alt="">
|
||||
</li>
|
||||
<li @click="jumpDetail(item)" class="contentListLi" v-else>
|
||||
<img class="proIcon" :src="item.goods.icon" alt="">
|
||||
<p>{{ item.goods.name }}</p>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
<ul v-if="cssData.contentType === 3" class="contentMatrix">
|
||||
<template v-for="(item, index) in (!pageData ? cssData.defaultMatrix : pageData)" :key="index">
|
||||
<li v-if="!pageData">
|
||||
<img class="defaultMatrixImg" :src="cssData.defaultMatrixImg" alt="">
|
||||
</li>
|
||||
<li @click="jumpDetail(item)" class="contentMatrixLi" v-else>
|
||||
<img class="proIcon" :src="item.goods.icon" alt="">
|
||||
<p>{{ item.goods.name }}</p>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
<div v-if="cssData.activityDescType === 1" class="btn" :style="{ color: cssData.btnColor, backgroundColor: cssData.btnBgc }">立即兑换</div>
|
||||
<img v-if="cssData.activityDescType === 1 && cssData.bottomImg.length" class="bottomImg" :src="cssData.bottomImg[0].url" alt="">
|
||||
<img v-if="cssData.activityDescType === 2 && cssData.floatImg" @click="changePopComStatus" class="floatImg" :src="cssData.floatImg" alt="">
|
||||
<div v-if="cssData.activityDescType === 3 && cssData.floatText" class="description-3" v-html="cssData.floatText" />
|
||||
|
||||
<div v-if="popComStatus" class="popWrapper">
|
||||
<img @click="changePopComStatus" class="backImg" src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
|
||||
<p class="title">活动规则</p>
|
||||
<div v-if="cssData.floatText" class="description-2" v-html="cssData.floatText"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <swiper class="swiperBox" :options="swiperOptions">-->
|
||||
<!-- <swiper-slide class="swiper-slide" v-for="image in imgList" :key="image">-->
|
||||
<!-- <img :src="image" alt="">-->
|
||||
<!-- </swiper-slide>-->
|
||||
<!-- </swiper>-->
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import "./index.scss";
|
||||
import config from "./config";
|
||||
import { QUERY } from "@/router/api";
|
||||
import { GET_THEME } from "./api";
|
||||
|
||||
import { Swiper, SwiperSlide } from 'vue-awesome-swiper';
|
||||
import 'swiper/swiper-bundle.css';
|
||||
|
||||
export default {
|
||||
name: 'cmsList',
|
||||
components: {
|
||||
// Swiper,
|
||||
// SwiperSlide
|
||||
},
|
||||
props: {
|
||||
comType: {
|
||||
type: Number,
|
||||
default: 1, // 1 H5 2 配置页
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return {}
|
||||
} // 配置表单
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
imgList: [
|
||||
require('@/views/pages/comProduct/img/imgIcon3_1.png'),
|
||||
require('@/views/pages/comProduct/img/imgIcon3_2.png'),
|
||||
require('@/views/pages/comProduct/img/imgIcon3_3.png'),
|
||||
],
|
||||
swiperOptions: {
|
||||
// Effects
|
||||
effect: 'coverflow', // 你可以设置为 'slide', 'fade', 'cube', 'coverflow', 'flip', 'zoom' 等
|
||||
// Autoplay
|
||||
autoplay: {
|
||||
delay: 3000,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
// effect: 'cube', // 异形切换效果
|
||||
// slidesPerView: 3,
|
||||
// autoHeight: true,
|
||||
},
|
||||
key: this.$route.query.key || localStorage.getItem("key"),
|
||||
loadingStatus: false,
|
||||
pageData: null,
|
||||
cssData: {
|
||||
bannerUrl: '',
|
||||
bannerTop: [{ name: '', url: 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/goodstop.png'}],
|
||||
btnColor: 'rgb(255, 255, 255)',
|
||||
btnBgc: 'rgb(250, 205, 106)',
|
||||
contentType: 1, // 样式:1 轮播 2 列表 3 矩阵
|
||||
activityDescType: 1, //活动说明:1 图片 2 悬浮 3 富文本
|
||||
bottomImg: [] as Array<any>,
|
||||
floatImg: 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/acticeTextTip.png',
|
||||
floatText: '',
|
||||
|
||||
carouselImg: 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/swiper.png',
|
||||
defaultList: [1, 2, 3, 4, 5],
|
||||
defaultListImg: 'https://lsxdmgoss.oss-cn-chengdu.aliyuncs.com/MarketingSystem/image/uploads/2024-08-20/A89BB503-00DC-456e-B757-CA04ADFA9C06.png',
|
||||
defaultMatrix: [1, 2, 3, 4, 5, 6],
|
||||
defaultMatrixImg: 'https://lsxdmgoss.oss-cn-chengdu.aliyuncs.com/MarketingSystem/image/uploads/2024-08-20/0338CC5C-D9FD-4f9d-B65C-DCAB50F2FAA7.png',
|
||||
},
|
||||
popComStatus: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.$props.comType === 1) {
|
||||
this.getData()
|
||||
} else {
|
||||
this.$emit('getDefault', config);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
formData: {
|
||||
handler(newVal) {
|
||||
console.log('---list-watch---', newVal);
|
||||
this.cssData = {
|
||||
...this.cssData,
|
||||
...newVal
|
||||
}
|
||||
},
|
||||
deep:true
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
changePopComStatus() {
|
||||
this.popComStatus = !this.popComStatus;
|
||||
},
|
||||
async getData() {
|
||||
this.loadingStatus = true;
|
||||
if (sessionStorage.getItem('transferProListData')) {
|
||||
const data = JSON.parse(sessionStorage.getItem('transferProListData') || '');
|
||||
this.pageData = [ ...data ];
|
||||
console.log('---缓存列表数据---', this.pageData);
|
||||
await this.getCss('39' || data[0].goods.theme_goods_detail_id);
|
||||
} else {
|
||||
const res = await QUERY({ key: this.key });
|
||||
if (res && res.code === 200) {
|
||||
if (res.data.length) {
|
||||
this.pageData = [ ...res.data ];
|
||||
console.log('---接口列表数据---', this.pageData);
|
||||
await this.getCss('39' || res.data[0].goods.theme_goods_detail_id);
|
||||
} else {
|
||||
showToast('商品数据为空');
|
||||
}
|
||||
} else {
|
||||
showToast(res.message);
|
||||
}
|
||||
}
|
||||
},
|
||||
async getCss(id: number | string) {
|
||||
const res = await GET_THEME({ id: id });
|
||||
if (res && res.code === 200) {
|
||||
console.log('---列表模版数据---', JSON.parse(res.data.config));
|
||||
this.cssData = {
|
||||
...this.cssData,
|
||||
...JSON.parse(res.data.config)
|
||||
};
|
||||
this.loadingStatus = false;
|
||||
} else {
|
||||
showToast(res.message);
|
||||
}
|
||||
},
|
||||
jumpBanner() {
|
||||
if (this.comType === 2) return;
|
||||
if (this.cssData.bannerUrl) {
|
||||
location.href = this.cssData.bannerUrl;
|
||||
}
|
||||
},
|
||||
jumpDetail(item: any) {
|
||||
if (this.comType === 2) return;
|
||||
sessionStorage.setItem('transferProDetailData', JSON.stringify(item));
|
||||
let params = {
|
||||
path: '/cmsDetail',
|
||||
query: { key: this.key, id: item.id }
|
||||
}
|
||||
if (item.goods.group_id) {
|
||||
params.path = '/comProduct';
|
||||
}
|
||||
this.$router.push(params);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,24 @@
|
|||
<template>
|
||||
<van-loading class="loading" size="24px" color="#0094ff" vertical>请求失败,请刷新重试</van-loading>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'transferError',
|
||||
created() {
|
||||
const identify = sessionStorage.getItem('transferError_page_identify');
|
||||
if (!identify) {
|
||||
sessionStorage.setItem('transferError_page_identify', 'is');
|
||||
} else {
|
||||
const redirect = this.$route.query.redirect;
|
||||
this.$router.replace(String(redirect));
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.loading {
|
||||
margin-top: 200px;
|
||||
}
|
||||
</style>
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"noImplicitThis": false,
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"strict": true,
|
||||
|
|