diff --git a/.env.base b/.env.base index 1aac7d8..0bb1059 100644 --- a/.env.base +++ b/.env.base @@ -17,3 +17,9 @@ VITE_API_URL=/admin-api # 打包路径 VITE_BASE_PATH=/ + +# 高德key +VITE_AMAP_KEY=88e30921c6f18e41f6f05a32186e75ee + +# 高德密钥 +VITE_AMAP_CODE=38277204d100038ca67747b43eed5a57 diff --git a/.env.dev b/.env.dev index a52eec3..0bb1059 100644 --- a/.env.dev +++ b/.env.dev @@ -1,13 +1,13 @@ -# 开发环境 -NODE_ENV=production +# 本地开发环境 +NODE_ENV=development -VITE_DEV=false +VITE_DEV=true # 请求路径 -VITE_BASE_URL='http://localhost:48080' +VITE_BASE_URL='https://b2c-pro-api-dev.zkthink.com' # 上传路径 -VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload' +VITE_UPLOAD_URL='https://b2c-pro-api-dev.zkthink.com/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH=/dev-api @@ -18,14 +18,8 @@ VITE_API_URL=/admin-api # 打包路径 VITE_BASE_PATH=/ -# 是否删除debugger -VITE_DROP_DEBUGGER=false +# 高德key +VITE_AMAP_KEY=88e30921c6f18e41f6f05a32186e75ee -# 是否删除console.log -VITE_DROP_CONSOLE=false - -# 是否sourcemap -VITE_SOURCEMAP=true - -# 输出路径 -VITE_OUT_DIR=dist-dev +# 高德密钥 +VITE_AMAP_CODE=38277204d100038ca67747b43eed5a57 diff --git a/.env.front b/.env.front index 199f242..01d0834 100644 --- a/.env.front +++ b/.env.front @@ -32,3 +32,7 @@ VITE_SOURCEMAP=true # 验证码的开关 VITE_APP_CAPTCHA_ENABLE=true +# 高德key +VITE_AMAP_KEY=88e30921c6f18e41f6f05a32186e75ee +# 高德密钥 +VITE_AMAP_CODE=38277204d100038ca67747b43eed5a57 diff --git a/.env.pro b/.env.pro index bf9ecbd..ce13a93 100644 --- a/.env.pro +++ b/.env.pro @@ -4,10 +4,10 @@ NODE_ENV=production VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://localhost:48082' +VITE_BASE_URL='https://b2c-pro-api.zkthink.com' # 上传路径 -VITE_UPLOAD_URL='http://localhost:48082/admin-api/infra/file/upload' +VITE_UPLOAD_URL='https://b2c-pro-api.zkthink.com/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= @@ -29,3 +29,8 @@ VITE_BASE_PATH=/ # 输出路径 VITE_OUT_DIR=dist + +# 高德key +VITE_AMAP_KEY=88e30921c6f18e41f6f05a32186e75ee +# 高德密钥 +VITE_AMAP_CODE=38277204d100038ca67747b43eed5a57 diff --git a/.env.stage b/.env.stage index 748b4d9..6b21cc3 100644 --- a/.env.stage +++ b/.env.stage @@ -29,3 +29,7 @@ VITE_BASE_PATH='http://static-vue3.yixiang.co/' # 输出路径 VITE_OUT_DIR=dist-stage +# 高德key +VITE_AMAP_KEY=88e30921c6f18e41f6f05a32186e75ee +# 高德密钥 +VITE_AMAP_CODE=38277204d100038ca67747b43eed5a57 diff --git a/.env.static b/.env.static index 15d5c74..5305dc7 100644 --- a/.env.static +++ b/.env.static @@ -29,3 +29,7 @@ VITE_BASE_PATH=/admin-ui-vue3/ # 输出路径 VITE_OUT_DIR=dist-dev +# 高德key +VITE_AMAP_KEY=88e30921c6f18e41f6f05a32186e75ee +# 高德密钥 +VITE_AMAP_CODE=38277204d100038ca67747b43eed5a57 diff --git a/.env.test b/.env.test index d32c769..9d134c5 100644 --- a/.env.test +++ b/.env.test @@ -29,3 +29,8 @@ VITE_BASE_PATH=/ # 输出路径 VITE_OUT_DIR=dist + +# 高德key +VITE_AMAP_KEY=88e30921c6f18e41f6f05a32186e75ee +# 高德密钥 +VITE_AMAP_CODE=38277204d100038ca67747b43eed5a57 diff --git a/.eslintrc.js b/.eslintrc.js index 4543113..491c11e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -42,7 +42,6 @@ module.exports = defineConfig({ '@typescript-eslint/no-unused-vars': 'error', 'no-unused-vars': 'error', 'space-before-function-paren': 'off', - 'vue/attributes-order': 'off', 'vue/one-component-per-file': 'off', 'vue/html-closing-bracket-newline': 'off', @@ -57,7 +56,7 @@ module.exports = defineConfig({ { html: { void: 'always', - normal: 'never', + normal: 'any', component: 'always' }, svg: 'always', @@ -65,6 +64,7 @@ module.exports = defineConfig({ } ], 'vue/multi-word-component-names': 'off', - "prettier/prettier": "off" + "prettier/prettier": "off", + "vue/no-v-html":"off" } }) diff --git a/.gitignore b/.gitignore index 1c25718..2d86e6b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,9 @@ node_modules .DS_Store -dist -dist-ssr +#dist +#dist-ssr *.local -/dist* +#/dist* *-lock.* pnpm-debug auto-*.d.ts diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index d153093..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "recommendations": [ - "voorjaar.windicss-intellisense", - "vscode-icons-team.vscode-icons", - "davidanson.vscode-markdownlint", - "stylelint.vscode-stylelint", - "dbaeumer.vscode-eslint", - "esbenp.prettier-vscode", - "vue.volar", - "lokalise.i18n-ally", - "mikestead.dotenv", - "eamodio.gitlens", - "antfu.iconify" - ] -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index f43edc0..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "msedge", - "request": "launch", - "name": "Launch Edge against localhost", - "url": "http://localhost", - "webRoot": "${workspaceFolder}/src", - "sourceMaps": true - } - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 3036ebf..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "typescript.tsdk": "node_modules/typescript/lib", - "prettier.enable": true, - "editor.formatOnType": true, - "editor.formatOnSave": true, - "editor.formatOnPaste": true, - "editor.codeActionsOnSave": { - "source.fixAll.eslint": true - }, - "[vue]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[javascript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[jsonc]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[html]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[css]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[scss]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "i18n-ally.localesPaths": ["src/locales"], - "i18n-ally.keystyle": "nested", - "i18n-ally.sortKeys": true, - "i18n-ally.namespace": true, - "i18n-ally.enabledParsers": ["ts"], - "i18n-ally.sourceLanguage": "en", - "i18n-ally.displayLanguage": "zh-CN", - "i18n-ally.enabledFrameworks": ["vue", "react"], - "god.tsconfig": "./tsconfig.json", - "vue-i18n.i18nPaths": "src/locales", - "explorer.fileNesting.enabled": true, - "explorer.fileNesting.expand": false, - "explorer.fileNesting.patterns": { - "*.ts": "$(capture).test.ts, $(capture).test.tsx", - "*.tsx": "$(capture).test.ts, $(capture).test.tsx", - "*.env": "$(capture).env.*", - "CHANGELOG.md": "CHANGELOG*", - "package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,README*,.npmrc,.browserslistrc,vite.config.*,windi.*,tailwind.*,tsconfig.*,postcss*", - ".eslintrc.js": ".eslintignore,.eslintrc-*,.prettierignore,.stylelintignore,.commitlintrc.js,.prettierrc.js,.stylelint*,stylelint*,prettier.*,.editorconfig" - } -} diff --git a/index.html b/index.html index dd28237..b949355 100644 --- a/index.html +++ b/index.html @@ -145,6 +145,12 @@ + diff --git a/package.json b/package.json index e8e2f0a..ff05688 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "build:pro": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode pro", "build:dev": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode dev", "build:stage": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode stage", - "build:test": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode test", + "build:test": "node --max_old_space_size=16384 ./node_modules/vite/bin/vite.js build --mode test", "build:static": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode static", "build:front": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode front", "serve:pro": "vite preview --mode pro", @@ -28,11 +28,13 @@ "lint:pretty": "pretty-quick --staged" }, "dependencies": { + "@amap/amap-jsapi-loader": "^1.0.1", "@element-plus/icons-vue": "^2.1.0", "@form-create/designer": "^3.1.0", "@form-create/element-ui": "^3.1.17", "@iconify/iconify": "^3.1.0", "@videojs-player/vue": "^1.0.0", + "@vueup/vue-quill": "^1.2.0", "@vueuse/core": "^10.1.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.10", @@ -46,14 +48,16 @@ "crypto-js": "^4.1.1", "dayjs": "^1.11.7", "diagram-js": "^11.6.0", - "echarts": "^5.4.2", + "echarts": "^5.4.3", "echarts-wordcloud": "^2.1.0", "element-plus": "2.3.3", "fast-xml-parser": "^4.2.2", "highlight.js": "^11.7.0", "intro.js": "^7.0.1", + "js-cookie": "^3.0.5", "jsencrypt": "^3.3.2", "lodash-es": "^4.17.21", + "mime": "^3.0.0", "min-dash": "^4.1.0", "mitt": "^3.0.0", "nprogress": "^0.2.0", @@ -61,9 +65,11 @@ "qrcode": "^1.5.3", "qs": "^6.11.1", "steady-xml": "^0.1.0", + "swiper": "^11.0.5", "url": "^0.11.0", "video.js": "^8.0.4", "vue": "3.3.4", + "vue-draggable-next": "^2.2.1", "vue-i18n": "9.2.2", "vue-router": "^4.1.6", "vue-types": "^5.0.2", @@ -113,14 +119,15 @@ "stylelint-config-recommended": "^12.0.0", "stylelint-config-standard": "^33.0.0", "stylelint-order": "^6.0.3", + "tailwindcss": "^3.3.5", "terser": "^5.17.1", "typescript": "5.0.4", "unplugin-auto-import": "^0.15.3", "unplugin-element-plus": "^0.7.1", "unplugin-vue-components": "^0.24.1", - "vite": "4.3.1", + "vite": "^5.0.0", "vite-plugin-compression": "^0.5.1", - "vite-plugin-ejs": "^1.6.4", + "vite-plugin-ejs": "^1.7.0", "vite-plugin-eslint": "^1.8.1", "vite-plugin-progress": "^0.0.7", "vite-plugin-purge-icons": "^0.9.2", diff --git a/public/UEditor/third-party/SyntaxHighlighter/shCoreDefault.css b/public/UEditor/third-party/SyntaxHighlighter/shCoreDefault.css index e156a6f..83c3555 100644 --- a/public/UEditor/third-party/SyntaxHighlighter/shCoreDefault.css +++ b/public/UEditor/third-party/SyntaxHighlighter/shCoreDefault.css @@ -1 +1 @@ -.syntaxhighlighter a,.syntaxhighlighter div,.syntaxhighlighter code,.syntaxhighlighter,.syntaxhighlighter td,.syntaxhighlighter tr,.syntaxhighlighter tbody,.syntaxhighlighter thead,.syntaxhighlighter caption,.syntaxhighlighter textarea{-moz-border-radius:0 0 0 0!important;-webkit-border-radius:0 0 0 0!important;background:none!important;border:0!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;margin:0!important;outline:0!important;overflow:visible!important;padding:0!important;position:static!important;right:auto!important;text-align:left!important;top:auto!important;vertical-align:baseline!important;width:auto!important;box-sizing:content-box!important;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-weight:normal!important;font-style:normal!important;min-height:inherit!important;min-height:auto!important;font-size:13px!important}.syntaxhighlighter{width:100%!important;margin:.3em 0 .3em 0!important;position:relative!important;overflow:auto!important;background-color:#f5f5f5!important;border:1px solid #ccc!important;border-radius:4px!important;border-collapse:separate!important}.syntaxhighlighter.source{overflow:hidden!important}.syntaxhighlighter .bold{font-weight:bold!important}.syntaxhighlighter .italic{font-style:italic!important}.syntaxhighlighter .gutter div{white-space:pre!important;word-wrap:normal}.syntaxhighlighter caption{text-align:left!important;padding:.5em 0 .5em 1em!important}.syntaxhighlighter td.code{width:100%!important}.syntaxhighlighter td.code .container{position:relative!important}.syntaxhighlighter td.code .container textarea{box-sizing:border-box!important;position:absolute!important;left:0!important;top:0!important;width:100%!important;border:none!important;background:white!important;padding-left:1em!important;overflow:hidden!important;white-space:pre!important}.syntaxhighlighter td.gutter .line{text-align:right!important;padding:0 .5em 0 1em!important}.syntaxhighlighter td.code .line{padding:0 1em!important}.syntaxhighlighter.nogutter td.code .container textarea,.syntaxhighlighter.nogutter td.code .line{padding-left:0!important}.syntaxhighlighter.show{display:block!important}.syntaxhighlighter.collapsed table{display:none!important}.syntaxhighlighter.collapsed .toolbar{padding:.1em .8em 0 .8em!important;font-size:1em!important;position:static!important;width:auto!important}.syntaxhighlighter.collapsed .toolbar span{display:inline!important;margin-right:1em!important}.syntaxhighlighter.collapsed .toolbar span a{padding:0!important;display:none!important}.syntaxhighlighter.collapsed .toolbar span a.expandSource{display:inline!important}.syntaxhighlighter .toolbar{position:absolute!important;right:1px!important;top:1px!important;width:11px!important;height:11px!important;font-size:10px!important;z-index:10!important}.syntaxhighlighter .toolbar span.title{display:inline!important}.syntaxhighlighter .toolbar a{display:block!important;text-align:center!important;text-decoration:none!important;padding-top:1px!important}.syntaxhighlighter .toolbar a.expandSource{display:none!important}.syntaxhighlighter.ie{font-size:.9em!important;padding:1px 0 1px 0!important}.syntaxhighlighter.ie .toolbar{line-height:8px!important}.syntaxhighlighter.ie .toolbar a{padding-top:0!important}.syntaxhighlighter.printing .line.alt1 .content,.syntaxhighlighter.printing .line.alt2 .content,.syntaxhighlighter.printing .line.highlighted .number,.syntaxhighlighter.printing .line.highlighted.alt1 .content,.syntaxhighlighter.printing .line.highlighted.alt2 .content{background:none!important}.syntaxhighlighter.printing .line .number{color:#bbb!important}.syntaxhighlighter.printing .line .content{color:black!important}.syntaxhighlighter.printing .toolbar{display:none!important}.syntaxhighlighter.printing a{text-decoration:none!important}.syntaxhighlighter.printing .plain,.syntaxhighlighter.printing .plain a{color:black!important}.syntaxhighlighter.printing .comments,.syntaxhighlighter.printing .comments a{color:#008200!important}.syntaxhighlighter.printing .string,.syntaxhighlighter.printing .string a{color:blue!important}.syntaxhighlighter.printing .keyword{color:#ff7800!important;font-weight:bold!important}.syntaxhighlighter.printing .preprocessor{color:gray!important}.syntaxhighlighter.printing .variable{color:#a70!important}.syntaxhighlighter.printing .value{color:#090!important}.syntaxhighlighter.printing .functions{color:#ff1493!important}.syntaxhighlighter.printing .constants{color:#06c!important}.syntaxhighlighter.printing .script{font-weight:bold!important}.syntaxhighlighter.printing .color1,.syntaxhighlighter.printing .color1 a{color:gray!important}.syntaxhighlighter.printing .color2,.syntaxhighlighter.printing .color2 a{color:#ff1493!important}.syntaxhighlighter.printing .color3,.syntaxhighlighter.printing .color3 a{color:red!important}.syntaxhighlighter.printing .break,.syntaxhighlighter.printing .break a{color:black!important}.syntaxhighlighter{background-color:#f5f5f5!important}.syntaxhighlighter .line.highlighted.number{color:black!important}.syntaxhighlighter caption{color:black!important}.syntaxhighlighter .gutter{color:#afafaf!important;background-color:#f7f7f9!important;border-right:1px solid #e1e1e8!important;padding:9.5px 0 9.5px 9.5px!important;border-top-left-radius:4px!important;border-bottom-left-radius:4px!important;user-select:none!important;-moz-user-select:none!important;-webkit-user-select:none!important}.syntaxhighlighter .gutter .line.highlighted{background-color:#6ce26c!important;color:white!important}.syntaxhighlighter.printing .line .content{border:none!important}.syntaxhighlighter.collapsed{overflow:visible!important}.syntaxhighlighter.collapsed .toolbar{color:blue!important;background:white!important;border:1px solid #6ce26c!important}.syntaxhighlighter.collapsed .toolbar a{color:blue!important}.syntaxhighlighter.collapsed .toolbar a:hover{color:red!important}.syntaxhighlighter .toolbar{color:white!important;background:#6ce26c!important;border:none!important}.syntaxhighlighter .toolbar a{color:white!important}.syntaxhighlighter .toolbar a:hover{color:black!important}.syntaxhighlighter .plain,.syntaxhighlighter .plain a{color:black!important}.syntaxhighlighter .comments,.syntaxhighlighter .comments a{color:#008200!important}.syntaxhighlighter .string,.syntaxhighlighter .string a{color:blue!important}.syntaxhighlighter .keyword{color:#ff7800!important}.syntaxhighlighter .preprocessor{color:gray!important}.syntaxhighlighter .variable{color:#a70!important}.syntaxhighlighter .value{color:#090!important}.syntaxhighlighter .functions{color:#ff1493!important}.syntaxhighlighter .constants{color:#06c!important}.syntaxhighlighter .script{font-weight:bold!important;color:#ff7800!important;background-color:none!important}.syntaxhighlighter .color1,.syntaxhighlighter .color1 a{color:gray!important}.syntaxhighlighter .color2,.syntaxhighlighter .color2 a{color:#ff1493!important}.syntaxhighlighter .color3,.syntaxhighlighter .color3 a{color:red!important}.syntaxhighlighter .keyword{font-weight:bold!important} \ No newline at end of file +.syntaxhighlighter a,.syntaxhighlighter div,.syntaxhighlighter code,.syntaxhighlighter,.syntaxhighlighter td,.syntaxhighlighter tr,.syntaxhighlighter tbody,.syntaxhighlighter thead,.syntaxhighlighter caption,.syntaxhighlighter textarea{-moz-border-radius:0 0 0 0!important;-webkit-border-radius:0 0 0 0!important;background:none!important;border:0!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;margin:0!important;outline:0!important;overflow:visible!important;padding:0!important;position:static!important;right:auto!important;text-align:left!important;top:auto!important;vertical-align:baseline!important;width:auto!important;box-sizing:content-box!important;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-weight:normal!important;font-style:normal!important;min-height:inherit!important;min-height:auto!important;font-size:13px!important}.syntaxhighlighter{width:100%!important;margin:.3em 0 .3em 0!important;position:relative!important;overflow:auto!important;background-color:#f5f5f5!important;border:1px solid #ccc!important;border-radius:4px!important;border-collapse:separate!important}.syntaxhighlighter.source{overflow:hidden!important}.syntaxhighlighter .bold{font-weight:bold!important}.syntaxhighlighter .italic{font-style:italic!important}.syntaxhighlighter .gutter div{white-space:pre!important;word-wrap:normal}.syntaxhighlighter caption{text-align:left!important;padding:.5em 0 .5em 1em!important}.syntaxhighlighter td.code{width:100%!important}.syntaxhighlighter td.code .container{position:relative!important}.syntaxhighlighter td.code .container textarea{box-sizing:border-box!important;position:absolute!important;left:0!important;top:0!important;width:100%!important;border:none!important;background:white!important;padding-left:1em!important;overflow:hidden!important;white-space:pre!important}.syntaxhighlighter td.gutter .line{text-align:right!important;padding:0 .5em 0 1em!important}.syntaxhighlighter td.code .line{padding:0 1em!important}.syntaxhighlighter.nogutter td.code .container textarea,.syntaxhighlighter.nogutter td.code .line{padding-left:0!important}.syntaxhighlighter.show{display:block!important}.syntaxhighlighter.collapsed table{display:none!important}.syntaxhighlighter.collapsed .toolbar{padding:.1em .8em 0 .8em!important;font-size:1em!important;position:static!important;width:auto!important}.syntaxhighlighter.collapsed .toolbar span{display:inline!important;margin-right:1em!important}.syntaxhighlighter.collapsed .toolbar span a{padding:0!important;display:none!important}.syntaxhighlighter.collapsed .toolbar span a.expandSource{display:inline!important}.syntaxhighlighter .toolbar{position:absolute!important;right:1px!important;top:1px!important;width:11px!important;height:11px!important;font-size:10px!important;z-index:10!important}.syntaxhighlighter .toolbar span.title{display:inline!important}.syntaxhighlighter .toolbar a{display:block!important;text-align:center!important;text-decoration:none!important;padding-top:1px!important}.syntaxhighlighter .toolbar a.expandSource{display:none!important}.syntaxhighlighter.ie{font-size:.9em!important;padding:1px 0 1px 0!important}.syntaxhighlighter.ie .toolbar{line-height:8px!important}.syntaxhighlighter.ie .toolbar a{padding-top:0!important}.syntaxhighlighter.printing .line.alt1 .content,.syntaxhighlighter.printing .line.alt2 .content,.syntaxhighlighter.printing .line.highlighted .number,.syntaxhighlighter.printing .line.highlighted.alt1 .content,.syntaxhighlighter.printing .line.highlighted.alt2 .content{background:none!important}.syntaxhighlighter.printing .line .number{color:#bbb!important}.syntaxhighlighter.printing .line .content{color:black!important}.syntaxhighlighter.printing .toolbar{display:none!important}.syntaxhighlighter.printing a{text-decoration:none!important}.syntaxhighlighter.printing .plain,.syntaxhighlighter.printing .plain a{color:black!important}.syntaxhighlighter.printing .comments,.syntaxhighlighter.printing .comments a{color:#008200!important}.syntaxhighlighter.printing .string,.syntaxhighlighter.printing .string a{color:blue!important}.syntaxhighlighter.printing .keyword{color:var(--el-color-primary)!important;font-weight:bold!important}.syntaxhighlighter.printing .preprocessor{color:gray!important}.syntaxhighlighter.printing .variable{color:#a70!important}.syntaxhighlighter.printing .value{color:#090!important}.syntaxhighlighter.printing .functions{color:#ff1493!important}.syntaxhighlighter.printing .constants{color:#06c!important}.syntaxhighlighter.printing .script{font-weight:bold!important}.syntaxhighlighter.printing .color1,.syntaxhighlighter.printing .color1 a{color:gray!important}.syntaxhighlighter.printing .color2,.syntaxhighlighter.printing .color2 a{color:#ff1493!important}.syntaxhighlighter.printing .color3,.syntaxhighlighter.printing .color3 a{color:red!important}.syntaxhighlighter.printing .break,.syntaxhighlighter.printing .break a{color:black!important}.syntaxhighlighter{background-color:#f5f5f5!important}.syntaxhighlighter .line.highlighted.number{color:black!important}.syntaxhighlighter caption{color:black!important}.syntaxhighlighter .gutter{color:#afafaf!important;background-color:#f7f7f9!important;border-right:1px solid #e1e1e8!important;padding:9.5px 0 9.5px 9.5px!important;border-top-left-radius:4px!important;border-bottom-left-radius:4px!important;user-select:none!important;-moz-user-select:none!important;-webkit-user-select:none!important}.syntaxhighlighter .gutter .line.highlighted{background-color:#6ce26c!important;color:white!important}.syntaxhighlighter.printing .line .content{border:none!important}.syntaxhighlighter.collapsed{overflow:visible!important}.syntaxhighlighter.collapsed .toolbar{color:blue!important;background:white!important;border:1px solid #6ce26c!important}.syntaxhighlighter.collapsed .toolbar a{color:blue!important}.syntaxhighlighter.collapsed .toolbar a:hover{color:red!important}.syntaxhighlighter .toolbar{color:white!important;background:#6ce26c!important;border:none!important}.syntaxhighlighter .toolbar a{color:white!important}.syntaxhighlighter .toolbar a:hover{color:black!important}.syntaxhighlighter .plain,.syntaxhighlighter .plain a{color:black!important}.syntaxhighlighter .comments,.syntaxhighlighter .comments a{color:#008200!important}.syntaxhighlighter .string,.syntaxhighlighter .string a{color:blue!important}.syntaxhighlighter .keyword{color:var(--el-color-primary)!important}.syntaxhighlighter .preprocessor{color:gray!important}.syntaxhighlighter .variable{color:#a70!important}.syntaxhighlighter .value{color:#090!important}.syntaxhighlighter .functions{color:#ff1493!important}.syntaxhighlighter .constants{color:#06c!important}.syntaxhighlighter .script{font-weight:bold!important;color:var(--el-color-primary)!important;background-color:none!important}.syntaxhighlighter .color1,.syntaxhighlighter .color1 a{color:gray!important}.syntaxhighlighter .color2,.syntaxhighlighter .color2 a{color:#ff1493!important}.syntaxhighlighter .color3,.syntaxhighlighter .color3 a{color:red!important}.syntaxhighlighter .keyword{font-weight:bold!important} diff --git a/public/UEditor22/third-party/SyntaxHighlighter/shCoreDefault.css b/public/UEditor22/third-party/SyntaxHighlighter/shCoreDefault.css index e156a6f..83c3555 100644 --- a/public/UEditor22/third-party/SyntaxHighlighter/shCoreDefault.css +++ b/public/UEditor22/third-party/SyntaxHighlighter/shCoreDefault.css @@ -1 +1 @@ -.syntaxhighlighter a,.syntaxhighlighter div,.syntaxhighlighter code,.syntaxhighlighter,.syntaxhighlighter td,.syntaxhighlighter tr,.syntaxhighlighter tbody,.syntaxhighlighter thead,.syntaxhighlighter caption,.syntaxhighlighter textarea{-moz-border-radius:0 0 0 0!important;-webkit-border-radius:0 0 0 0!important;background:none!important;border:0!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;margin:0!important;outline:0!important;overflow:visible!important;padding:0!important;position:static!important;right:auto!important;text-align:left!important;top:auto!important;vertical-align:baseline!important;width:auto!important;box-sizing:content-box!important;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-weight:normal!important;font-style:normal!important;min-height:inherit!important;min-height:auto!important;font-size:13px!important}.syntaxhighlighter{width:100%!important;margin:.3em 0 .3em 0!important;position:relative!important;overflow:auto!important;background-color:#f5f5f5!important;border:1px solid #ccc!important;border-radius:4px!important;border-collapse:separate!important}.syntaxhighlighter.source{overflow:hidden!important}.syntaxhighlighter .bold{font-weight:bold!important}.syntaxhighlighter .italic{font-style:italic!important}.syntaxhighlighter .gutter div{white-space:pre!important;word-wrap:normal}.syntaxhighlighter caption{text-align:left!important;padding:.5em 0 .5em 1em!important}.syntaxhighlighter td.code{width:100%!important}.syntaxhighlighter td.code .container{position:relative!important}.syntaxhighlighter td.code .container textarea{box-sizing:border-box!important;position:absolute!important;left:0!important;top:0!important;width:100%!important;border:none!important;background:white!important;padding-left:1em!important;overflow:hidden!important;white-space:pre!important}.syntaxhighlighter td.gutter .line{text-align:right!important;padding:0 .5em 0 1em!important}.syntaxhighlighter td.code .line{padding:0 1em!important}.syntaxhighlighter.nogutter td.code .container textarea,.syntaxhighlighter.nogutter td.code .line{padding-left:0!important}.syntaxhighlighter.show{display:block!important}.syntaxhighlighter.collapsed table{display:none!important}.syntaxhighlighter.collapsed .toolbar{padding:.1em .8em 0 .8em!important;font-size:1em!important;position:static!important;width:auto!important}.syntaxhighlighter.collapsed .toolbar span{display:inline!important;margin-right:1em!important}.syntaxhighlighter.collapsed .toolbar span a{padding:0!important;display:none!important}.syntaxhighlighter.collapsed .toolbar span a.expandSource{display:inline!important}.syntaxhighlighter .toolbar{position:absolute!important;right:1px!important;top:1px!important;width:11px!important;height:11px!important;font-size:10px!important;z-index:10!important}.syntaxhighlighter .toolbar span.title{display:inline!important}.syntaxhighlighter .toolbar a{display:block!important;text-align:center!important;text-decoration:none!important;padding-top:1px!important}.syntaxhighlighter .toolbar a.expandSource{display:none!important}.syntaxhighlighter.ie{font-size:.9em!important;padding:1px 0 1px 0!important}.syntaxhighlighter.ie .toolbar{line-height:8px!important}.syntaxhighlighter.ie .toolbar a{padding-top:0!important}.syntaxhighlighter.printing .line.alt1 .content,.syntaxhighlighter.printing .line.alt2 .content,.syntaxhighlighter.printing .line.highlighted .number,.syntaxhighlighter.printing .line.highlighted.alt1 .content,.syntaxhighlighter.printing .line.highlighted.alt2 .content{background:none!important}.syntaxhighlighter.printing .line .number{color:#bbb!important}.syntaxhighlighter.printing .line .content{color:black!important}.syntaxhighlighter.printing .toolbar{display:none!important}.syntaxhighlighter.printing a{text-decoration:none!important}.syntaxhighlighter.printing .plain,.syntaxhighlighter.printing .plain a{color:black!important}.syntaxhighlighter.printing .comments,.syntaxhighlighter.printing .comments a{color:#008200!important}.syntaxhighlighter.printing .string,.syntaxhighlighter.printing .string a{color:blue!important}.syntaxhighlighter.printing .keyword{color:#ff7800!important;font-weight:bold!important}.syntaxhighlighter.printing .preprocessor{color:gray!important}.syntaxhighlighter.printing .variable{color:#a70!important}.syntaxhighlighter.printing .value{color:#090!important}.syntaxhighlighter.printing .functions{color:#ff1493!important}.syntaxhighlighter.printing .constants{color:#06c!important}.syntaxhighlighter.printing .script{font-weight:bold!important}.syntaxhighlighter.printing .color1,.syntaxhighlighter.printing .color1 a{color:gray!important}.syntaxhighlighter.printing .color2,.syntaxhighlighter.printing .color2 a{color:#ff1493!important}.syntaxhighlighter.printing .color3,.syntaxhighlighter.printing .color3 a{color:red!important}.syntaxhighlighter.printing .break,.syntaxhighlighter.printing .break a{color:black!important}.syntaxhighlighter{background-color:#f5f5f5!important}.syntaxhighlighter .line.highlighted.number{color:black!important}.syntaxhighlighter caption{color:black!important}.syntaxhighlighter .gutter{color:#afafaf!important;background-color:#f7f7f9!important;border-right:1px solid #e1e1e8!important;padding:9.5px 0 9.5px 9.5px!important;border-top-left-radius:4px!important;border-bottom-left-radius:4px!important;user-select:none!important;-moz-user-select:none!important;-webkit-user-select:none!important}.syntaxhighlighter .gutter .line.highlighted{background-color:#6ce26c!important;color:white!important}.syntaxhighlighter.printing .line .content{border:none!important}.syntaxhighlighter.collapsed{overflow:visible!important}.syntaxhighlighter.collapsed .toolbar{color:blue!important;background:white!important;border:1px solid #6ce26c!important}.syntaxhighlighter.collapsed .toolbar a{color:blue!important}.syntaxhighlighter.collapsed .toolbar a:hover{color:red!important}.syntaxhighlighter .toolbar{color:white!important;background:#6ce26c!important;border:none!important}.syntaxhighlighter .toolbar a{color:white!important}.syntaxhighlighter .toolbar a:hover{color:black!important}.syntaxhighlighter .plain,.syntaxhighlighter .plain a{color:black!important}.syntaxhighlighter .comments,.syntaxhighlighter .comments a{color:#008200!important}.syntaxhighlighter .string,.syntaxhighlighter .string a{color:blue!important}.syntaxhighlighter .keyword{color:#ff7800!important}.syntaxhighlighter .preprocessor{color:gray!important}.syntaxhighlighter .variable{color:#a70!important}.syntaxhighlighter .value{color:#090!important}.syntaxhighlighter .functions{color:#ff1493!important}.syntaxhighlighter .constants{color:#06c!important}.syntaxhighlighter .script{font-weight:bold!important;color:#ff7800!important;background-color:none!important}.syntaxhighlighter .color1,.syntaxhighlighter .color1 a{color:gray!important}.syntaxhighlighter .color2,.syntaxhighlighter .color2 a{color:#ff1493!important}.syntaxhighlighter .color3,.syntaxhighlighter .color3 a{color:red!important}.syntaxhighlighter .keyword{font-weight:bold!important} \ No newline at end of file +.syntaxhighlighter a,.syntaxhighlighter div,.syntaxhighlighter code,.syntaxhighlighter,.syntaxhighlighter td,.syntaxhighlighter tr,.syntaxhighlighter tbody,.syntaxhighlighter thead,.syntaxhighlighter caption,.syntaxhighlighter textarea{-moz-border-radius:0 0 0 0!important;-webkit-border-radius:0 0 0 0!important;background:none!important;border:0!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;margin:0!important;outline:0!important;overflow:visible!important;padding:0!important;position:static!important;right:auto!important;text-align:left!important;top:auto!important;vertical-align:baseline!important;width:auto!important;box-sizing:content-box!important;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-weight:normal!important;font-style:normal!important;min-height:inherit!important;min-height:auto!important;font-size:13px!important}.syntaxhighlighter{width:100%!important;margin:.3em 0 .3em 0!important;position:relative!important;overflow:auto!important;background-color:#f5f5f5!important;border:1px solid #ccc!important;border-radius:4px!important;border-collapse:separate!important}.syntaxhighlighter.source{overflow:hidden!important}.syntaxhighlighter .bold{font-weight:bold!important}.syntaxhighlighter .italic{font-style:italic!important}.syntaxhighlighter .gutter div{white-space:pre!important;word-wrap:normal}.syntaxhighlighter caption{text-align:left!important;padding:.5em 0 .5em 1em!important}.syntaxhighlighter td.code{width:100%!important}.syntaxhighlighter td.code .container{position:relative!important}.syntaxhighlighter td.code .container textarea{box-sizing:border-box!important;position:absolute!important;left:0!important;top:0!important;width:100%!important;border:none!important;background:white!important;padding-left:1em!important;overflow:hidden!important;white-space:pre!important}.syntaxhighlighter td.gutter .line{text-align:right!important;padding:0 .5em 0 1em!important}.syntaxhighlighter td.code .line{padding:0 1em!important}.syntaxhighlighter.nogutter td.code .container textarea,.syntaxhighlighter.nogutter td.code .line{padding-left:0!important}.syntaxhighlighter.show{display:block!important}.syntaxhighlighter.collapsed table{display:none!important}.syntaxhighlighter.collapsed .toolbar{padding:.1em .8em 0 .8em!important;font-size:1em!important;position:static!important;width:auto!important}.syntaxhighlighter.collapsed .toolbar span{display:inline!important;margin-right:1em!important}.syntaxhighlighter.collapsed .toolbar span a{padding:0!important;display:none!important}.syntaxhighlighter.collapsed .toolbar span a.expandSource{display:inline!important}.syntaxhighlighter .toolbar{position:absolute!important;right:1px!important;top:1px!important;width:11px!important;height:11px!important;font-size:10px!important;z-index:10!important}.syntaxhighlighter .toolbar span.title{display:inline!important}.syntaxhighlighter .toolbar a{display:block!important;text-align:center!important;text-decoration:none!important;padding-top:1px!important}.syntaxhighlighter .toolbar a.expandSource{display:none!important}.syntaxhighlighter.ie{font-size:.9em!important;padding:1px 0 1px 0!important}.syntaxhighlighter.ie .toolbar{line-height:8px!important}.syntaxhighlighter.ie .toolbar a{padding-top:0!important}.syntaxhighlighter.printing .line.alt1 .content,.syntaxhighlighter.printing .line.alt2 .content,.syntaxhighlighter.printing .line.highlighted .number,.syntaxhighlighter.printing .line.highlighted.alt1 .content,.syntaxhighlighter.printing .line.highlighted.alt2 .content{background:none!important}.syntaxhighlighter.printing .line .number{color:#bbb!important}.syntaxhighlighter.printing .line .content{color:black!important}.syntaxhighlighter.printing .toolbar{display:none!important}.syntaxhighlighter.printing a{text-decoration:none!important}.syntaxhighlighter.printing .plain,.syntaxhighlighter.printing .plain a{color:black!important}.syntaxhighlighter.printing .comments,.syntaxhighlighter.printing .comments a{color:#008200!important}.syntaxhighlighter.printing .string,.syntaxhighlighter.printing .string a{color:blue!important}.syntaxhighlighter.printing .keyword{color:var(--el-color-primary)!important;font-weight:bold!important}.syntaxhighlighter.printing .preprocessor{color:gray!important}.syntaxhighlighter.printing .variable{color:#a70!important}.syntaxhighlighter.printing .value{color:#090!important}.syntaxhighlighter.printing .functions{color:#ff1493!important}.syntaxhighlighter.printing .constants{color:#06c!important}.syntaxhighlighter.printing .script{font-weight:bold!important}.syntaxhighlighter.printing .color1,.syntaxhighlighter.printing .color1 a{color:gray!important}.syntaxhighlighter.printing .color2,.syntaxhighlighter.printing .color2 a{color:#ff1493!important}.syntaxhighlighter.printing .color3,.syntaxhighlighter.printing .color3 a{color:red!important}.syntaxhighlighter.printing .break,.syntaxhighlighter.printing .break a{color:black!important}.syntaxhighlighter{background-color:#f5f5f5!important}.syntaxhighlighter .line.highlighted.number{color:black!important}.syntaxhighlighter caption{color:black!important}.syntaxhighlighter .gutter{color:#afafaf!important;background-color:#f7f7f9!important;border-right:1px solid #e1e1e8!important;padding:9.5px 0 9.5px 9.5px!important;border-top-left-radius:4px!important;border-bottom-left-radius:4px!important;user-select:none!important;-moz-user-select:none!important;-webkit-user-select:none!important}.syntaxhighlighter .gutter .line.highlighted{background-color:#6ce26c!important;color:white!important}.syntaxhighlighter.printing .line .content{border:none!important}.syntaxhighlighter.collapsed{overflow:visible!important}.syntaxhighlighter.collapsed .toolbar{color:blue!important;background:white!important;border:1px solid #6ce26c!important}.syntaxhighlighter.collapsed .toolbar a{color:blue!important}.syntaxhighlighter.collapsed .toolbar a:hover{color:red!important}.syntaxhighlighter .toolbar{color:white!important;background:#6ce26c!important;border:none!important}.syntaxhighlighter .toolbar a{color:white!important}.syntaxhighlighter .toolbar a:hover{color:black!important}.syntaxhighlighter .plain,.syntaxhighlighter .plain a{color:black!important}.syntaxhighlighter .comments,.syntaxhighlighter .comments a{color:#008200!important}.syntaxhighlighter .string,.syntaxhighlighter .string a{color:blue!important}.syntaxhighlighter .keyword{color:var(--el-color-primary)!important}.syntaxhighlighter .preprocessor{color:gray!important}.syntaxhighlighter .variable{color:#a70!important}.syntaxhighlighter .value{color:#090!important}.syntaxhighlighter .functions{color:#ff1493!important}.syntaxhighlighter .constants{color:#06c!important}.syntaxhighlighter .script{font-weight:bold!important;color:var(--el-color-primary)!important;background-color:none!important}.syntaxhighlighter .color1,.syntaxhighlighter .color1 a{color:gray!important}.syntaxhighlighter .color2,.syntaxhighlighter .color2 a{color:#ff1493!important}.syntaxhighlighter .color3,.syntaxhighlighter .color3 a{color:red!important}.syntaxhighlighter .keyword{font-weight:bold!important} diff --git a/src/api/distributor/level/index.ts b/src/api/distributor/level/index.ts new file mode 100644 index 0000000..7925e3b --- /dev/null +++ b/src/api/distributor/level/index.ts @@ -0,0 +1,29 @@ +import request from '@/config/axios' +import {CreateLevel, LevelData, LevelListItem, ResponList} from "@/types/distributor"; +// 查询分销商等级列表 +export const getLevelPage = async (params):Promise> => { + return await request.get({ url: `/distributor/level/page`, params }) +} + +// 创建分销等级 +export const createLevelApi = async (data: CreateLevel)=> { + return await request.post({ url: `/distributor/level/create`, data }) +} + +// 修改分销等级 +export const updateLevelApi = async (data: CreateLevel)=> { + return await request.put({ url: `/distributor/level/update`, data }) +} +// 删除等级 +// export const deleteLevel = async (id: number) => { +// return await request.delete({ url: `/distributor/level/delete?id=` + id }) +// } + +// 获取已有分销商等级 +export const getHaveLevelApi = async ()=> { + return await request.get({ url: `/distributor/level/get-all` }) +} +// 获取分销商等级 +export const getLevelDetail = async (id: number):Promise => { + return await request.get({ url: '/distributor/level/get?id=' + id }) +} diff --git a/src/api/distributor/merchant/index.ts b/src/api/distributor/merchant/index.ts new file mode 100644 index 0000000..fec4260 --- /dev/null +++ b/src/api/distributor/merchant/index.ts @@ -0,0 +1,27 @@ +import request from '@/config/axios' +import {DistributorDetail} from "@/types/distributor"; +// 查询分销商列表 +export const getDistributorPage = async (params)=> { + return await request.get({ url: `/distributor/distributor/page`, params }) +} +// 审核分销商 +export const auditDistributorApi = async (data)=> { + return await request.post({ url: `/distributor/distributor/verify`, data }) +} + +// 获取分销商详情 +export const getDistributorDetail = async (id: number):Promise => { + return await request.get({ url: '/distributor/distributor/get?id=' + id }) +} +// 清退分销商 +export const checkDistributorApi = async (data)=> { + return await request.post({ url: `/distributor/distributor/clearance`, data }) +} +// 删除分销商 +export const removalOfDistributorApi = async (id: number)=> { + return await request.delete({ url: `/distributor/distributor/delete?id=${id}` }) +} +// 佣金列表 +export const getWagesLogPage = async (params)=> { + return await request.get({ url: `/distributor/wages-log/page`, params }) +} diff --git a/src/api/distributor/order/index.ts b/src/api/distributor/order/index.ts new file mode 100644 index 0000000..890a205 --- /dev/null +++ b/src/api/distributor/order/index.ts @@ -0,0 +1,9 @@ +import request from '@/config/axios' +// 查询分销订单列表 +export const getDistributorOrderPage = async (params)=> { + return await request.get({ url: `/distributor/order/page`, params }) +} +// 获取订单详情 +export const getDistributorOrderDetail = async (id: number)=> { + return await request.get({ url: `/distributor/order/get?id=${id}`, }) +} diff --git a/src/api/finance/recharge/index.model.ts b/src/api/finance/recharge/index.model.ts new file mode 100644 index 0000000..ef71d86 --- /dev/null +++ b/src/api/finance/recharge/index.model.ts @@ -0,0 +1,44 @@ +/** + * @name: index.model + * @author: kahu4 + * @date: 2024-01-29 12:18 + * @description:充值type + * @update: 2024-01-29 12:18 + * */ +export interface RechargeQuery extends PageParam { + status?:RechargeStatusEnum + createTime?:any[], + id?:any, + username?:string +} + +export interface RechargeVO { + id:string + userId:string + status:number + rechargeAmount:RechargeStatusEnum + giftAmount:number + packageId:any + userName:string + createTime:any +} + +export enum RechargeStatusEnum { + PENDING = 0, // 未支付 + SUCCESS = 1, // 已支付 +} + +/** 充值设置 */ +export interface RechargeConfigModel{ + customSwitch:0|1 //自定义金额开关 0-关闭 1-开启 + customMin:number //自定义金额最小值 + content:string //自定义金额内容 + rechargePackageBaseVOS:RechargePackageBaseVO[] +} +export interface RechargePackageBaseVO{ + rechargeAmount:number + giftAmount:number + status:0|1 // 状态 0-关闭 1-开启 + id:any + createTime:any +} diff --git a/src/api/finance/recharge/index.ts b/src/api/finance/recharge/index.ts new file mode 100644 index 0000000..c4eb7b5 --- /dev/null +++ b/src/api/finance/recharge/index.ts @@ -0,0 +1,35 @@ +/** + * @name: index.ts + * @author: kahu4 + * @date: 2024-01-29 12:18 + * @description:index.ts + * @update: 2024-01-29 12:18 + * */ +import request from '@/config/axios' +import { + RechargeConfigModel, + RechargeQuery, + RechargeVO +} from "@/api/finance/recharge/index.model"; + +export const getList = (params:RechargeQuery)=>request.get>({ + url:'/order/recharge-order/page', + params +}) + +/** + * 获取配置 + */ +export const getRechargeRule = ()=>request.get({ + url:'/order/recharge-config/get-all-config', +}) + + +/** + * 设置配置 + * @param data + */ +export const setRechargeRule = (data:RechargeConfigModel)=>request.post({ + url:'/order/recharge-config/update-all-config', + data +}) diff --git a/src/api/finance/withdraw/index.model.ts b/src/api/finance/withdraw/index.model.ts new file mode 100644 index 0000000..89db3e4 --- /dev/null +++ b/src/api/finance/withdraw/index.model.ts @@ -0,0 +1,46 @@ +/** + * @name: index.model + * @author: kahu4 + * @date: 2024-01-29 12:18 + * @description:index.model + * @update: 2024-01-29 12:18 + * */ + +export interface WithdrawQuery extends PageParam{ + userName?:string + type?:WidthType + createTime?:any[] +} + +export interface WithdrawVO{ + wagesId:string + userId:string + type:WidthType + amount:number + distributorId:number + userName:string + distributorName:string + methodType:MethodType + id:number + createTime:string +} + +export enum MethodType{ + BALANCE, + ALI_PAY +} + +export enum WidthType{ + WAIT, // 待入账 + COMPLETE, // 已入账 + CANCEL, // 已取消 + WITHDRAW_WAIT, // 提现中 + WITHDRAW_COMPLETE, // 提现成功 + WITHDRAW_FAIL // 提现失败 +} + +export interface WithdrawAuditModel{ + id:any, + content:string, + type:4|5 // 4通过 5拒绝 +} diff --git a/src/api/finance/withdraw/index.ts b/src/api/finance/withdraw/index.ts new file mode 100644 index 0000000..720eb23 --- /dev/null +++ b/src/api/finance/withdraw/index.ts @@ -0,0 +1,29 @@ +/** + * @name: index.ts + * @author: kahu4 + * @date: 2024-01-29 12:18 + * @description:index.ts + * @update: 2024-01-29 12:18 + * */ +import request from '@/config/axios' +import { WithdrawAuditModel, WithdrawQuery, WithdrawVO } from "@/api/finance/withdraw/index.model"; + +export const getList = (params:WithdrawQuery) => request.get>({ + url:'/distributor/wages-log/verify-page', + params +}) + + +export const audit = (data:WithdrawAuditModel)=>request.post({ + url:'/distributor/wages-log/verify', + data +}) + +export const exportExcel = () => request.download({ + url: '/distributor/wages-log/export-excel' +}) + +export const getById = (params:{id:any}) => request.get({ + url:'/distributor/wages-log/get-verify', + params +}) diff --git a/src/api/mall/decoration/adverts.ts b/src/api/mall/decoration/adverts.ts new file mode 100644 index 0000000..426a5a1 --- /dev/null +++ b/src/api/mall/decoration/adverts.ts @@ -0,0 +1,31 @@ +import request from '@/config/axios' + +export interface AdvertsVO { + id: number + name: string +} + +// 查询广告列表 +export const getAdvertsPage = async (params: AdvertsVO) => { + return await request.get({ url: `/shop/popup/page`, params }) +} + +// 新增广告信息 +export const createAdverts = async (data: AdvertsVO) => { + return await request.post({ url: `/shop/popup/create`, data }) +} + +// 修改广告信息 +export const updateAdverts = async (data: AdvertsVO) => { + return await request.put({ url: `/shop/popup/update`, data }) +} + +// 删除广告信息 +export const deleteAdverts = async (id: number) => { + return await request.delete({ url: '/shop/popup/delete?id=' + id }) +} + +// 获取广告信息 +export const getAdverts = async (id: number) => { + return await request.get({ url: '/shop/popup/get?id=' + id }) +} diff --git a/src/api/mall/decoration/canvas.ts b/src/api/mall/decoration/canvas.ts new file mode 100644 index 0000000..41752e7 --- /dev/null +++ b/src/api/mall/decoration/canvas.ts @@ -0,0 +1,41 @@ +import request from '@/config/axios' + +export interface CanvasVO { + id: number + name: string +} + +// 查询画布信息列表 +export const getCanvasPage = async (params: CanvasVO) => { + return await request.get({ url: `/shop/canvas/page`, params }) +} + +// 新增画布信息 +export const createCanvas = async (data: CanvasVO) => { + return await request.post({ url: `/shop/canvas/create`, data }) +} + +// 修改画布信息 +export const updateCanvas = async (data: CanvasVO) => { + return await request.put({ url: `/shop/canvas/update`, data }) +} + +// 删除画布信息 +export const deleteCanvas = async (id: number) => { + return await request.delete({ url: '/shop/canvas/delete?id=' + id }) +} + +// 获取画布信息 +export const getCanvas = async (id: number) => { + return await request.get({ url: '/shop/canvas/get?id=' + id }) +} + +// 导出画布信息 Excel +export const exportCanvasExcel = async (params) => { + return await request.download({ url: `/shop/canvas/export-excel`, params }) +} + +// 设为首页 +export const setCanvas = async (id: number) => { + return await request.get({ url: '/shop/canvas/use?id=' + id }) +} diff --git a/src/api/mall/order/storeOrder/index.ts b/src/api/mall/order/storeOrder/index.ts index 9464a5c..da9fc57 100644 --- a/src/api/mall/order/storeOrder/index.ts +++ b/src/api/mall/order/storeOrder/index.ts @@ -109,3 +109,7 @@ export const getShopCount = async () => { return await request.get({ url: `/order/store-order/count`}) } +// 订单核销 +export const orderCancellation = async (data) => { + return await request.post({ url: `/order/store-order/writeOff`, data }) +} diff --git a/src/api/mall/product/category.ts b/src/api/mall/product/category.ts index 7ae8128..691d14f 100644 --- a/src/api/mall/product/category.ts +++ b/src/api/mall/product/category.ts @@ -58,3 +58,8 @@ export const getCategory = (id: number) => { export const getCategoryList = (params: any) => { return request.get({ url: '/product/category/list', params }) } + +// 获得商品分类树 +export const getCategoryTree = () => { + return request.get({ url: '/product/category/tree' }) +} diff --git a/src/api/mall/product/discountCoupon/index.ts b/src/api/mall/product/discountCoupon/index.ts index 3465a2c..5012e2d 100644 --- a/src/api/mall/product/discountCoupon/index.ts +++ b/src/api/mall/product/discountCoupon/index.ts @@ -34,3 +34,8 @@ export const updateDiscountCoupon = async (data) => { export const deleteDiscountCoupon = async (id: number) => { return await request.get({ url: `/product/coupon/delete/` + id }) } + +// 查询可用画布优惠券列表 +export const getCanvasCouponPage = async (params: DiscountCouponPageReqVO) => { + return await request.get({ url: `/product/coupon/canvas/page`, params }) +} diff --git a/src/api/mall/shop/shop/index.ts b/src/api/mall/shop/shop/index.ts new file mode 100644 index 0000000..c89b08b --- /dev/null +++ b/src/api/mall/shop/shop/index.ts @@ -0,0 +1,47 @@ +import request from '@/config/axios' + +export interface ShopVO { + id: number + storeName: string + storeIntro: string + storePhone: string + iconUrl: string + address: string + lon: object + lat: object + writeOffStartTime: Date + writeOffEndTime: Date + businessStartTime: Date + businessEndTime: Date + status: boolean +} + +// 查询门店列表 +export const getShopPage = async (params: ShopPageReqVO) => { + return await request.get({ url: `/mall/shop/page`, params }) +} + +// 查询门店详情 +export const getShop = async (id: number) => { + return await request.get({ url: `/mall/shop/get?id=` + id }) +} + +// 新增门店 +export const createShop = async (data: ShopVO) => { + return await request.post({ url: `/mall/shop/create`, data }) +} + +// 修改门店 +export const updateShop = async (data: ShopVO) => { + return await request.put({ url: `/mall/shop/update`, data }) +} + +// 删除门店 +export const deleteShop = async (id: number) => { + return await request.delete({ url: `/mall/shop/delete?id=` + id }) +} + +// 导出门店 Excel +export const exportShop = async (params) => { + return await request.download({ url: `/mall/shop/export-excel`, params }) +} diff --git a/src/api/mall/shopAssistant/index.ts b/src/api/mall/shopAssistant/index.ts new file mode 100644 index 0000000..a93fc5c --- /dev/null +++ b/src/api/mall/shopAssistant/index.ts @@ -0,0 +1,49 @@ +import request from '@/config/axios' + +export interface ShopAssistantVO { + id: number + storeId: number + userId: number + name: string + phoneNo: string + status: boolean +} + +// 查询门店店员列表 +export const getShopAssistantPage = async (params: ShopAssistantPageReqVO) => { + return await request.get({ url: `/mall/shop-assistant/page`, params }) +} + +// 查询门店店员详情 +export const getShopAssistant = async (id: number) => { + return await request.get({ url: `/mall/shop-assistant/get?id=` + id }) +} + +// 新增门店店员 +export const createShopAssistant = async (data: ShopAssistantVO) => { + return await request.post({ url: `/mall/shop-assistant/create`, data }) +} + +// 修改门店店员 +export const updateShopAssistant = async (data: ShopAssistantVO) => { + return await request.put({ url: `/mall/shop-assistant/update`, data }) +} + +// 删除门店店员 +export const deleteShopAssistant = async (id: number) => { + return await request.delete({ url: `/mall/shop-assistant/delete?id=` + id }) +} + +// 导出门店店员 Excel +export const exportShopAssistant = async (params) => { + return await request.download({ url: `/mall/shop-assistant/export-excel`, params }) +} +// 查询门店店员列表 +export const getShopUserList = async (params) => { + return await request.get({ url: `/member/user/userList`, params }) +} + +// 查询门店店员列表 +export const getShopList = async (params?) => { + return await request.get({ url: `/mall/shop/shopList`, params }) +} diff --git a/src/api/marketing/index.ts b/src/api/marketing/index.ts new file mode 100644 index 0000000..9a03bdf --- /dev/null +++ b/src/api/marketing/index.ts @@ -0,0 +1,64 @@ +import request from '@/config/axios' +import { + CreateActivity, + ActivityList, + ActivityDataList, + ResponList, + ActivityProduct +} from '@/types/activity' +// 新增活动 +export const createActivityApi = async (data: CreateActivity) => { + return await request.post({ url: `/product/campaign-info/create`, data }) +} + +// 查询活动列表 +export const getActivityPage = async (params): Promise> => { + return await request.get({ url: `/product/campaign-info/page`, params }) +} + +// 查询活动商品列表 +export const getActivityProductList = async (params): Promise> => { + return await request.get({ url: `/product/store-product/campaign-product/page`, params }) +} +// 查询活动详情 +export const getStoreActivityInfo = async (id: number) => { + return await request.get({ url: `/product/campaign-info/get?id=` + id }) +} + +// 结束活动 +export const endingActivity = async (id: number) => { + return await request.get({ url: `/product/campaign-info/close?id=` + id }) +} + +// 确认活动 +export const confirmationActivity = async (id: number) => { + return await request.get({ url: `/product/campaign-info/start?id=` + id }) +} + +// 修改活动 +export const updateActivityApi = async (data) => { + return await request.put({ url: `/product/campaign-info/update`, data }) +} + +// 删除活动 +export const deleteStoreActivity = async (id: number) => { + return await request.delete({ url: `/product/campaign-info/delete?id=` + id }) +} + +// 获取活动数据 +export const getActivityData = async (id: number) => { + return await request.get({ url: `/product/campaign-info/data?id=` + id }) +} +// 查询活动商品数据列表 +export const getActivityListData = async (params):Promise => { + return await request.get({ url: `/product/campaign-info/data-detail`, params }) +} + +// 查询拼团列表 +export const getGroupPage = async (params) => { + return await request.get({ url: `/product/teamwork-info/page`, params }) +} +// 查询拼团详情 +export const getGroupInfoList = async (params) => { + return await request.get({ url: `/product/teamwork-info/order-page`, params }) +} diff --git a/src/api/member/integralRule/index.ts b/src/api/member/integralRule/index.ts new file mode 100644 index 0000000..7331eec --- /dev/null +++ b/src/api/member/integralRule/index.ts @@ -0,0 +1,47 @@ +import request from '@/config/axios' + +export interface IntegralRuleVO { + id: number + type: string + typeName: string + integral: number + attribute1: string +} + +// 查询会员积分规则列表 +export const getIntegralRulePage = async (params: IntegralRulePageReqVO) => { + return await request.get({ url: `/member/integral-rule/page`, params }) +} + +// 查询会员积分规则详情 +export const getIntegralRule = async (id: number) => { + return await request.get({ url: `/member/integral-rule/get?id=` + id }) +} + +// 新增会员积分规则 +export const createIntegralRule = async (data: IntegralRuleVO) => { + return await request.post({ url: `/member/integral-rule/create`, data }) +} + +// 修改会员积分规则 +export const updateIntegralRule = async (data: IntegralRuleVO) => { + return await request.put({ url: `/member/integral-rule/update`, data }) +} + +// 删除会员积分规则 +export const deleteIntegralRule = async (id: number) => { + return await request.delete({ url: `/member/integral-rule/delete?id=` + id }) +} + +// 导出会员积分规则 Excel +export const exportIntegralRule = async (params) => { + return await request.download({ url: `/member/integral-rule/export-excel`, params }) +} + +// 保存会员积分规则 +export const saveIntegralRule = async (data) => { + return await request.post({ url: `/member/integral-rule/saveRule`, data }) +} +export const getIntegrationRule = async () => { + return await request.get({ url: `/member/integral-rule/getRule` }) +} diff --git a/src/api/member/signInRecord/index.ts b/src/api/member/signInRecord/index.ts new file mode 100644 index 0000000..3637ec2 --- /dev/null +++ b/src/api/member/signInRecord/index.ts @@ -0,0 +1,37 @@ +import request from '@/config/axios' + +export interface SignInRecordVO { + id: number + userId: number + integral: number +} + +// 查询签到记录列表 +export const getSignInRecordPage = async (params: SignInRecordPageReqVO) => { + return await request.get({ url: `/member/sign-in-record/page`, params }) +} + +// 查询签到记录详情 +export const getSignInRecord = async (id: number) => { + return await request.get({ url: `/member/sign-in-record/get?id=` + id }) +} + +// 新增签到记录 +export const createSignInRecord = async (data: SignInRecordVO) => { + return await request.post({ url: `/member/sign-in-record/create`, data }) +} + +// 修改签到记录 +export const updateSignInRecord = async (data: SignInRecordVO) => { + return await request.put({ url: `/member/sign-in-record/update`, data }) +} + +// 删除签到记录 +export const deleteSignInRecord = async (id: number) => { + return await request.delete({ url: `/member/sign-in-record/delete?id=` + id }) +} + +// 导出签到记录 Excel +export const exportSignInRecord = async (params) => { + return await request.download({ url: `/member/sign-in-record/export-excel`, params }) +} diff --git a/src/api/member/user/index.ts b/src/api/member/user/index.ts index 107ea4a..76a15c4 100644 --- a/src/api/member/user/index.ts +++ b/src/api/member/user/index.ts @@ -64,6 +64,6 @@ export const deleteUser = async (id: number) => { } // 导出用户 Excel -export const exportUser = async (params) => { - return await request.download({ url: `/member/user/export-excel`, params }) +export const exportUser = async () => { + return await request.download({ url: `/member/user/export-excel` }) } diff --git a/src/api/member/userInviteLog/index.ts b/src/api/member/userInviteLog/index.ts new file mode 100644 index 0000000..a1c6d9b --- /dev/null +++ b/src/api/member/userInviteLog/index.ts @@ -0,0 +1,37 @@ +import request from '@/config/axios' + +export interface UserInviteLogVO { + id: number + userId: number + beInviteUserId: number +} + +// 查询邀请日志列表 +export const getUserInviteLogPage = async (params: UserInviteLogPageReqVO) => { + return await request.get({ url: `/member/user-invite-log/page`, params }) +} + +// 查询邀请日志详情 +export const getUserInviteLog = async (id: number) => { + return await request.get({ url: `/member/user-invite-log/get?id=` + id }) +} + +// 新增邀请日志 +export const createUserInviteLog = async (data: UserInviteLogVO) => { + return await request.post({ url: `/member/user-invite-log/create`, data }) +} + +// 修改邀请日志 +export const updateUserInviteLog = async (data: UserInviteLogVO) => { + return await request.put({ url: `/member/user-invite-log/update`, data }) +} + +// 删除邀请日志 +export const deleteUserInviteLog = async (id: number) => { + return await request.delete({ url: `/member/user-invite-log/delete?id=` + id }) +} + +// 导出邀请日志 Excel +export const exportUserInviteLog = async (params) => { + return await request.download({ url: `/member/user-invite-log/export-excel`, params }) +} diff --git a/src/api/member/userLevelConfig/index.ts b/src/api/member/userLevelConfig/index.ts new file mode 100644 index 0000000..108764d --- /dev/null +++ b/src/api/member/userLevelConfig/index.ts @@ -0,0 +1,42 @@ +import request from '@/config/axios' + +export interface UserLevelConfigVO { + id: number + levelName: string + level: number + growthValue: number + iconUrl: string + backgroundUrl: string + status: boolean + remarks: string +} + +// 查询会员等级配置列表 +export const getUserLevelConfigPage = async (params: UserLevelConfigPageReqVO) => { + return await request.get({ url: `/member/user-level-config/page`, params }) +} + +// 查询会员等级配置详情 +export const getUserLevelConfig = async (id: number) => { + return await request.get({ url: `/member/user-level-config/get?id=` + id }) +} + +// 新增会员等级配置 +export const createUserLevelConfig = async (data: UserLevelConfigVO) => { + return await request.post({ url: `/member/user-level-config/create`, data }) +} + +// 修改会员等级配置 +export const updateUserLevelConfig = async (data: UserLevelConfigVO) => { + return await request.put({ url: `/member/user-level-config/update`, data }) +} + +// 删除会员等级配置 +export const deleteUserLevelConfig = async (id: number) => { + return await request.delete({ url: `/member/user-level-config/delete?id=` + id }) +} + +// 导出会员等级配置 Excel +export const exportUserLevelConfig = async (params) => { + return await request.download({ url: `/member/user-level-config/export-excel`, params }) +} diff --git a/src/api/member/userLevelEquity/index.ts b/src/api/member/userLevelEquity/index.ts new file mode 100644 index 0000000..570af84 --- /dev/null +++ b/src/api/member/userLevelEquity/index.ts @@ -0,0 +1,44 @@ +import request from '@/config/axios' + +export interface UserLevelEquityVO { + id: number + type: string + typeName: string + equityValue: number + iconUrl: string +} + +// 查询会员等级权益配置列表 +export const getUserLevelEquityPage = async (params: UserLevelEquityPageReqVO) => { + return await request.get({ url: `/member/user-level-equity/page`, params }) +} + +// 查询会员等级所有权益 +export const getAllLevelEquityPage = async () => { + return await request.get({ url: `/member/user-level-equity/list` }) +} + +// 查询会员等级权益配置详情 +export const getUserLevelEquity = async (id: number) => { + return await request.get({ url: `/member/user-level-equity/get?id=` + id }) +} + +// 新增会员等级权益配置 +export const createUserLevelEquity = async (data: UserLevelEquityVO) => { + return await request.post({ url: `/member/user-level-equity/create`, data }) +} + +// 修改会员等级权益配置 +export const updateUserLevelEquity = async (data: UserLevelEquityVO) => { + return await request.put({ url: `/member/user-level-equity/update`, data }) +} + +// 删除会员等级权益配置 +export const deleteUserLevelEquity = async (id: number) => { + return await request.delete({ url: `/member/user-level-equity/delete?id=` + id }) +} + +// 导出会员等级权益配置 Excel +export const exportUserLevelEquity = async (params) => { + return await request.download({ url: `/member/user-level-equity/export-excel`, params }) +} diff --git a/src/api/member/userLevelEquityRef/index.ts b/src/api/member/userLevelEquityRef/index.ts new file mode 100644 index 0000000..ffd33f7 --- /dev/null +++ b/src/api/member/userLevelEquityRef/index.ts @@ -0,0 +1,37 @@ +import request from '@/config/axios' + +export interface UserLevelEquityRefVO { + id: number + levelId: number + equityId: number +} + +// 查询会员等级权益中间列表 +export const getUserLevelEquityRefPage = async (params: UserLevelEquityRefPageReqVO) => { + return await request.get({ url: `/member/user-level-equity-ref/page`, params }) +} + +// 查询会员等级权益中间详情 +export const getUserLevelEquityRef = async (id: number) => { + return await request.get({ url: `/member/user-level-equity-ref/get?id=` + id }) +} + +// 新增会员等级权益中间 +export const createUserLevelEquityRef = async (data: UserLevelEquityRefVO) => { + return await request.post({ url: `/member/user-level-equity-ref/create`, data }) +} + +// 修改会员等级权益中间 +export const updateUserLevelEquityRef = async (data: UserLevelEquityRefVO) => { + return await request.put({ url: `/member/user-level-equity-ref/update`, data }) +} + +// 删除会员等级权益中间 +export const deleteUserLevelEquityRef = async (id: number) => { + return await request.delete({ url: `/member/user-level-equity-ref/delete?id=` + id }) +} + +// 导出会员等级权益中间 Excel +export const exportUserLevelEquityRef = async (params) => { + return await request.download({ url: `/member/user-level-equity-ref/export-excel`, params }) +} diff --git a/src/api/member/userLevelGrowthValueConfig/index.ts b/src/api/member/userLevelGrowthValueConfig/index.ts new file mode 100644 index 0000000..b30cab1 --- /dev/null +++ b/src/api/member/userLevelGrowthValueConfig/index.ts @@ -0,0 +1,38 @@ +import request from '@/config/axios' + +export interface UserLevelGrowthValueConfigVO { + id: number + type: string + typeName: string + growthValue: number +} + +// 查询会员成长任务配置列表 +export const getUserLevelGrowthValueConfigPage = async (params: UserLevelGrowthValueConfigPageReqVO) => { + return await request.get({ url: `/member/user-level-growth-value-config/page`, params }) +} + +// 查询会员成长任务配置详情 +export const getUserLevelGrowthValueConfig = async (id: number) => { + return await request.get({ url: `/member/user-level-growth-value-config/get?id=` + id }) +} + +// 新增会员成长任务配置 +export const createUserLevelGrowthValueConfig = async (data: UserLevelGrowthValueConfigVO) => { + return await request.post({ url: `/member/user-level-growth-value-config/create`, data }) +} + +// 修改会员成长任务配置 +export const updateUserLevelGrowthValueConfig = async (data: UserLevelGrowthValueConfigVO) => { + return await request.put({ url: `/member/user-level-growth-value-config/update`, data }) +} + +// 删除会员成长任务配置 +export const deleteUserLevelGrowthValueConfig = async (id: number) => { + return await request.delete({ url: `/member/user-level-growth-value-config/delete?id=` + id }) +} + +// 导出会员成长任务配置 Excel +export const exportUserLevelGrowthValueConfig = async (params) => { + return await request.download({ url: `/member/user-level-growth-value-config/export-excel`, params }) +} diff --git a/src/api/member/userTag/index.ts b/src/api/member/userTag/index.ts new file mode 100644 index 0000000..0aa7f43 --- /dev/null +++ b/src/api/member/userTag/index.ts @@ -0,0 +1,42 @@ +import request from '@/config/axios' + +export interface UserTagVO { + id: number + tagName: string + groupId: number +} + +// 查询会员标签列表 +export const getUserTagPage = async (params: UserTagPageReqVO) => { + return await request.get({ url: `/member/user-tag/page`, params }) +} + +// 查询会员标签详情 +export const getUserTag = async (id: number) => { + return await request.get({ url: `/member/user-tag/get?id=` + id }) +} + +// 新增会员标签 +export const createUserTag = async (data: UserTagVO) => { + return await request.post({ url: `/member/user-tag/create`, data }) +} + +// 修改会员标签 +export const updateUserTag = async (data: UserTagVO) => { + return await request.put({ url: `/member/user-tag/update`, data }) +} + +// 删除会员标签 +export const deleteUserTag = async (id: number) => { + return await request.delete({ url: `/member/user-tag/delete?id=` + id }) +} + +// 导出会员标签 Excel +export const exportUserTag = async (params) => { + return await request.download({ url: `/member/user-tag/export-excel`, params }) +} + +// 更新用户标签 +export const updateMemberTags = async (data) => { + return await request.post({ url: `/member/user/updateTag`, data }) +} diff --git a/src/api/member/userTagGroup/index.ts b/src/api/member/userTagGroup/index.ts new file mode 100644 index 0000000..f6180fa --- /dev/null +++ b/src/api/member/userTagGroup/index.ts @@ -0,0 +1,42 @@ +import request from '@/config/axios' + +export interface UserTagGroupVO { + id: number + groupName: string + sorted: number +} + +// 查询会员标签分组列表 +export const getUserTagGroupPage = async (params: UserTagGroupPageReqVO) => { + return await request.get({ url: `/member/user-tag-group/page`, params }) +} + +// 查询所有会员标签分组列表 +export const getAllGroupPage = async () => { + return await request.get({ url: `/member/user-tag-group/list` }) +} + +// 查询会员标签分组详情 +export const getUserTagGroup = async (id: number) => { + return await request.get({ url: `/member/user-tag-group/get?id=` + id }) +} + +// 新增会员标签分组 +export const createUserTagGroup = async (data: UserTagGroupVO) => { + return await request.post({ url: `/member/user-tag-group/create`, data }) +} + +// 修改会员标签分组 +export const updateUserTagGroup = async (data: UserTagGroupVO) => { + return await request.put({ url: `/member/user-tag-group/update`, data }) +} + +// 删除会员标签分组 +export const deleteUserTagGroup = async (id: number) => { + return await request.delete({ url: `/member/user-tag-group/delete?id=` + id }) +} + +// 导出会员标签分组 Excel +export const exportUserTagGroup = async (params) => { + return await request.download({ url: `/member/user-tag-group/export-excel`, params }) +} diff --git a/src/api/system/dict/dict.type.ts b/src/api/system/dict/dict.type.ts index ed2969f..14fdc35 100644 --- a/src/api/system/dict/dict.type.ts +++ b/src/api/system/dict/dict.type.ts @@ -42,3 +42,13 @@ export const deleteDictType = (id: number) => { export const exportDictType = (params) => { return request.get({ url: '/system/dict-type/export', params }) } + +// 获取分销配置 +export const getDistributionDictConfig = ()=>{ + return request.get({url:'/system/dict-data/get-distributor-config'}) +} + +// 设置分销配置 +export const updateDistributionDictConfig = (data)=>{ + return request.post({url:'/system/dict-data/update-distributor-config',data}) +} diff --git a/src/api/system/home/index.ts b/src/api/system/home/index.ts new file mode 100644 index 0000000..62333d9 --- /dev/null +++ b/src/api/system/home/index.ts @@ -0,0 +1,11 @@ +import request from '@/config/axios' + + +// 查询埋点统计 +export const getBuryPointChart = () => { + return request.get({ url: '/member/bury-point/get-trend-chart' }) +} +// 查询订单统计 +export const getStoreOrderChart = () => { + return request.get({ url: '/order/store-order/get-trend-chart ' }) +} diff --git a/src/api/tools/materialgroup.js b/src/api/tools/materialgroup.js index 4c9b02d..e1a49ea 100644 --- a/src/api/tools/materialgroup.js +++ b/src/api/tools/materialgroup.js @@ -50,3 +50,10 @@ export async function putObj(obj) { data: obj }) } + +export async function batchUpdateObj(obj) { + return await request.post({ + url: '/shop/material/batch-update-group', + data: obj + }) +} diff --git a/src/components/AMap/index.model.ts b/src/components/AMap/index.model.ts new file mode 100644 index 0000000..fb45039 --- /dev/null +++ b/src/components/AMap/index.model.ts @@ -0,0 +1,11 @@ +/** + * @name: index.model + * @author: kahu4 + * @date: 2024-02-01 17:46 + * @description:index.model + * @update: 2024-02-01 17:46 + * */ +export interface AMapDialogOptionsModel{ + title?:string, + lnglat?:any[] +} diff --git a/src/components/AMap/index.vue b/src/components/AMap/index.vue new file mode 100644 index 0000000..9fc6f22 --- /dev/null +++ b/src/components/AMap/index.vue @@ -0,0 +1,383 @@ + + + + + + + diff --git a/src/components/Basics/couponSelect.vue b/src/components/Basics/couponSelect.vue new file mode 100644 index 0000000..2683eaf --- /dev/null +++ b/src/components/Basics/couponSelect.vue @@ -0,0 +1,177 @@ + + + + + diff --git a/src/components/Basics/productSelect.vue b/src/components/Basics/productSelect.vue new file mode 100644 index 0000000..db88ce0 --- /dev/null +++ b/src/components/Basics/productSelect.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/src/components/Cropper/src/CropperAvatar.vue b/src/components/Cropper/src/CropperAvatar.vue index 179e0ec..1ac6185 100644 --- a/src/components/Cropper/src/CropperAvatar.vue +++ b/src/components/Cropper/src/CropperAvatar.vue @@ -93,7 +93,7 @@ $prefix-cls: #{$namespace}--cropper-avatar; cursor: pointer; transition: opacity 0.4s; - ::v-deep(svg) { + :deep(svg) { margin: auto; } } diff --git a/src/components/Materials/src/Materials.vue b/src/components/Materials/src/Materials.vue index cf50f54..3ee53ab 100644 --- a/src/components/Materials/src/Materials.vue +++ b/src/components/Materials/src/Materials.vue @@ -95,18 +95,21 @@ - - 批量上传 - +
+ 批量修改分组 + + 批量上传 + +
@@ -120,9 +123,9 @@ center show-icon /> - + - + + + + + + + @@ -506,4 +563,19 @@ function sureUrls() { padding: unset !important; font-size: 12px; } +.btn-group{ + display: flex; + justify-content: flex-end; + .el-button{ + margin-left: 10px; + } +} + +.img-item{ + margin-bottom: 10px; +} + +.pagination{ + margin-top: 10px; +} diff --git a/src/components/canvas/assets/font/DIN-Bold.eot b/src/components/canvas/assets/font/DIN-Bold.eot new file mode 100755 index 0000000..3c50ddd Binary files /dev/null and b/src/components/canvas/assets/font/DIN-Bold.eot differ diff --git a/src/components/canvas/assets/font/DIN-Bold.otf b/src/components/canvas/assets/font/DIN-Bold.otf new file mode 100755 index 0000000..5abc696 Binary files /dev/null and b/src/components/canvas/assets/font/DIN-Bold.otf differ diff --git a/src/components/canvas/assets/font/DIN-Bold.ttf b/src/components/canvas/assets/font/DIN-Bold.ttf new file mode 100755 index 0000000..6de7fb7 Binary files /dev/null and b/src/components/canvas/assets/font/DIN-Bold.ttf differ diff --git a/src/components/canvas/assets/font/DIN-Bold.woff b/src/components/canvas/assets/font/DIN-Bold.woff new file mode 100755 index 0000000..4d5975f Binary files /dev/null and b/src/components/canvas/assets/font/DIN-Bold.woff differ diff --git a/src/components/canvas/assets/font/DIN-Bold.woff2 b/src/components/canvas/assets/font/DIN-Bold.woff2 new file mode 100755 index 0000000..51e67b6 Binary files /dev/null and b/src/components/canvas/assets/font/DIN-Bold.woff2 differ diff --git a/src/components/canvas/assets/font_icon/demo.css b/src/components/canvas/assets/font_icon/demo.css new file mode 100644 index 0000000..a67054a --- /dev/null +++ b/src/components/canvas/assets/font_icon/demo.css @@ -0,0 +1,539 @@ +/* Logo 字体 */ +@font-face { + font-family: "iconfont logo"; + src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834'); + src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'), + url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'), + url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'), + url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg'); +} + +.logo { + font-family: "iconfont logo"; + font-size: 160px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +/* tabs */ +.nav-tabs { + position: relative; +} + +.nav-tabs .nav-more { + position: absolute; + right: 0; + bottom: 0; + height: 42px; + line-height: 42px; + color: #666; +} + +#tabs { + border-bottom: 1px solid #eee; +} + +#tabs li { + cursor: pointer; + width: 100px; + height: 40px; + line-height: 40px; + text-align: center; + font-size: 16px; + border-bottom: 2px solid transparent; + position: relative; + z-index: 1; + margin-bottom: -1px; + color: #666; +} + + +#tabs .active { + border-bottom-color: #f00; + color: #222; +} + +.tab-container .content { + display: none; +} + +/* 页面布局 */ +.main { + padding: 30px 100px; + width: 960px; + margin: 0 auto; +} + +.main .logo { + color: #333; + text-align: left; + margin-bottom: 30px; + line-height: 1; + height: 110px; + margin-top: -50px; + overflow: hidden; + *zoom: 1; +} + +.main .logo a { + font-size: 160px; + color: #333; +} + +.helps { + margin-top: 40px; +} + +.helps pre { + padding: 20px; + margin: 10px 0; + border: solid 1px #e7e1cd; + background-color: #fffdef; + overflow: auto; +} + +.icon_lists { + width: 100% !important; + overflow: hidden; + *zoom: 1; +} + +.icon_lists li { + width: 100px; + margin-bottom: 10px; + margin-right: 20px; + text-align: center; + list-style: none !important; + cursor: default; +} + +.icon_lists li .code-name { + line-height: 1.2; +} + +.icon_lists .icon { + display: block; + height: 100px; + line-height: 100px; + font-size: 42px; + margin: 10px auto; + color: #333; + -webkit-transition: font-size 0.25s linear, width 0.25s linear; + -moz-transition: font-size 0.25s linear, width 0.25s linear; + transition: font-size 0.25s linear, width 0.25s linear; +} + +.icon_lists .icon:hover { + font-size: 100px; +} + +.icon_lists .svg-icon { + /* 通过设置 font-size 来改变图标大小 */ + width: 1em; + /* 图标和文字相邻时,垂直对齐 */ + vertical-align: -0.15em; + /* 通过设置 color 来改变 SVG 的颜色/fill */ + fill: currentColor; + /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示 + normalize.css 中也包含这行 */ + overflow: hidden; +} + +.icon_lists li .name, +.icon_lists li .code-name { + color: #666; +} + +/* markdown 样式 */ +.markdown { + color: #666; + font-size: 14px; + line-height: 1.8; +} + +.highlight { + line-height: 1.5; +} + +.markdown img { + vertical-align: middle; + max-width: 100%; +} + +.markdown h1 { + color: #404040; + font-weight: 500; + line-height: 40px; + margin-bottom: 24px; +} + +.markdown h2, +.markdown h3, +.markdown h4, +.markdown h5, +.markdown h6 { + color: #404040; + margin: 1.6em 0 0.6em 0; + font-weight: 500; + clear: both; +} + +.markdown h1 { + font-size: 28px; +} + +.markdown h2 { + font-size: 22px; +} + +.markdown h3 { + font-size: 16px; +} + +.markdown h4 { + font-size: 14px; +} + +.markdown h5 { + font-size: 12px; +} + +.markdown h6 { + font-size: 12px; +} + +.markdown hr { + height: 1px; + border: 0; + background: #e9e9e9; + margin: 16px 0; + clear: both; +} + +.markdown p { + margin: 1em 0; +} + +.markdown>p, +.markdown>blockquote, +.markdown>.highlight, +.markdown>ol, +.markdown>ul { + width: 80%; +} + +.markdown ul>li { + list-style: circle; +} + +.markdown>ul li, +.markdown blockquote ul>li { + margin-left: 20px; + padding-left: 4px; +} + +.markdown>ul li p, +.markdown>ol li p { + margin: 0.6em 0; +} + +.markdown ol>li { + list-style: decimal; +} + +.markdown>ol li, +.markdown blockquote ol>li { + margin-left: 20px; + padding-left: 4px; +} + +.markdown code { + margin: 0 3px; + padding: 0 5px; + background: #eee; + border-radius: 3px; +} + +.markdown strong, +.markdown b { + font-weight: 600; +} + +.markdown>table { + border-collapse: collapse; + border-spacing: 0px; + empty-cells: show; + border: 1px solid #e9e9e9; + width: 95%; + margin-bottom: 24px; +} + +.markdown>table th { + white-space: nowrap; + color: #333; + font-weight: 600; +} + +.markdown>table th, +.markdown>table td { + border: 1px solid #e9e9e9; + padding: 8px 16px; + text-align: left; +} + +.markdown>table th { + background: #F7F7F7; +} + +.markdown blockquote { + font-size: 90%; + color: #999; + border-left: 4px solid #e9e9e9; + padding-left: 0.8em; + margin: 1em 0; +} + +.markdown blockquote p { + margin: 0; +} + +.markdown .anchor { + opacity: 0; + transition: opacity 0.3s ease; + margin-left: 8px; +} + +.markdown .waiting { + color: #ccc; +} + +.markdown h1:hover .anchor, +.markdown h2:hover .anchor, +.markdown h3:hover .anchor, +.markdown h4:hover .anchor, +.markdown h5:hover .anchor, +.markdown h6:hover .anchor { + opacity: 1; + display: inline-block; +} + +.markdown>br, +.markdown>p>br { + clear: both; +} + + +.hljs { + display: block; + background: white; + padding: 0.5em; + color: #333333; + overflow-x: auto; +} + +.hljs-comment, +.hljs-meta { + color: #969896; +} + +.hljs-string, +.hljs-variable, +.hljs-template-variable, +.hljs-strong, +.hljs-emphasis, +.hljs-quote { + color: #df5000; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-type { + color: #a71d5d; +} + +.hljs-literal, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute { + color: #0086b3; +} + +.hljs-section, +.hljs-name { + color: #63a35c; +} + +.hljs-tag { + color: #333333; +} + +.hljs-title, +.hljs-attr, +.hljs-selector-id, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #795da3; +} + +.hljs-addition { + color: #55a532; + background-color: #eaffea; +} + +.hljs-deletion { + color: #bd2c00; + background-color: #ffecec; +} + +.hljs-link { + text-decoration: underline; +} + +/* 代码高亮 */ +/* PrismJS 1.15.0 +https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */ +/** + * prism.js default theme for JavaScript, CSS and HTML + * Based on dabblet (http://dabblet.com) + * @author Lea Verou + */ +code[class*="language-"], +pre[class*="language-"] { + color: black; + background: none; + text-shadow: 0 1px white; + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +pre[class*="language-"]::-moz-selection, +pre[class*="language-"] ::-moz-selection, +code[class*="language-"]::-moz-selection, +code[class*="language-"] ::-moz-selection { + text-shadow: none; + background: #b3d4fc; +} + +pre[class*="language-"]::selection, +pre[class*="language-"] ::selection, +code[class*="language-"]::selection, +code[class*="language-"] ::selection { + text-shadow: none; + background: #b3d4fc; +} + +@media print { + + code[class*="language-"], + pre[class*="language-"] { + text-shadow: none; + } +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: .5em 0; + overflow: auto; +} + +:not(pre)>code[class*="language-"], +pre[class*="language-"] { + background: #f5f2f0; +} + +/* Inline code */ +:not(pre)>code[class*="language-"] { + padding: .1em; + border-radius: .3em; + white-space: normal; +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: slategray; +} + +.token.punctuation { + color: #999; +} + +.namespace { + opacity: .7; +} + +.token.property, +.token.tag, +.token.boolean, +.token.number, +.token.constant, +.token.symbol, +.token.deleted { + color: #905; +} + +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: #690; +} + +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: #9a6e3a; + background: hsla(0, 0%, 100%, .5); +} + +.token.atrule, +.token.attr-value, +.token.keyword { + color: #07a; +} + +.token.function, +.token.class-name { + color: #DD4A68; +} + +.token.regex, +.token.important, +.token.variable { + color: #e90; +} + +.token.important, +.token.bold { + font-weight: bold; +} + +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} diff --git a/src/components/canvas/assets/font_icon/demo_index.html b/src/components/canvas/assets/font_icon/demo_index.html new file mode 100644 index 0000000..d39aeb4 --- /dev/null +++ b/src/components/canvas/assets/font_icon/demo_index.html @@ -0,0 +1,2235 @@ + + + + + iconfont Demo + + + + + + + + + + + + + +
+

+ + +

+ +
+
+
    + +
  • + +
    直播
    +
    
    +
  • + +
  • + +
    轮播
    +
    
    +
  • + +
  • + +
    new
    +
    
    +
  • + +
  • + +
    会员
    +
    
    +
  • + +
  • + +
    商品
    +
    
    +
  • + +
  • + +
    公告
    +
    
    +
  • + +
  • + +
    魔方
    +
    
    +
  • + +
  • + +
    arrange1
    +
    
    +
  • + +
  • + +
    price
    +
    
    +
  • + +
  • + +
    arrange2
    +
    
    +
  • + +
  • + +
    公告
    +
    
    +
  • + +
  • + +
    秒杀
    +
    
    +
  • + +
  • + +
    折扣
    +
    
    +
  • + +
  • + +
    拼团
    +
    
    +
  • + +
  • + +
    秒杀1
    +
    
    +
  • + +
  • + +
    新品
    +
    
    +
  • + +
  • + +
    折扣1
    +
    
    +
  • + +
  • + +
    头部
    +
    
    +
  • + +
  • + +
    拼团1
    +
    
    +
  • + +
  • + +
    长方形
    +
    
    +
  • + +
  • + +
    +
    
    +
  • + +
  • + +
    优惠券3
    +
    
    +
  • + +
  • + +
    优惠券4
    +
    
    +
  • + +
  • + +
    优惠券2
    +
    
    +
  • + +
  • + +
    优惠券1
    +
    
    +
  • + +
  • + +
    卡片8
    +
    
    +
  • + +
  • + +
    卡片6
    +
    
    +
  • + +
  • + +
    卡片7
    +
    
    +
  • + +
  • + +
    卡片1
    +
    
    +
  • + +
  • + +
    卡片3
    +
    
    +
  • + +
  • + +
    卡片2
    +
    
    +
  • + +
  • + +
    卡片5
    +
    
    +
  • + +
  • + +
    卡片4
    +
    
    +
  • + +
  • + +
    app
    +
    
    +
  • + +
  • + +
    辅助分割
    +
    
    +
  • + +
  • + +
    pc
    +
    
    +
  • + +
  • + +
    h5
    +
    
    +
  • + +
  • + +
    图文
    +
    
    +
  • + +
  • + +
    商品列表
    +
    
    +
  • + +
  • + +
    类别列表
    +
    
    +
  • + +
  • + +
    视频
    +
    
    +
  • + +
  • + +
    图文导航
    +
    
    +
  • + +
  • + +
    自定义
    +
    
    +
  • + +
  • + +
    小程序
    +
    
    +
  • + +
  • + +
    图文列表
    +
    
    +
  • + +
  • + +
    优惠券
    +
    
    +
  • + +
  • + +
    文本
    +
    
    +
  • + +
  • + +
    品牌列表
    +
    
    +
  • + +
  • + +
    店铺头部
    +
    
    +
  • + +
  • + +
    魔方
    +
    
    +
  • + +
  • + +
    一行两个
    +
    
    +
  • + +
  • + +
    一行三个
    +
    
    +
  • + +
  • + +
    一行四个
    +
    
    +
  • + +
  • + +
    一左两右
    +
    
    +
  • + +
  • + +
    两行两个
    +
    
    +
  • + +
  • + +
    一上两下
    +
    
    +
  • + +
  • + +
    close
    +
    
    +
  • + +
  • + +
    替换图片
    +
    
    +
  • + +
  • + +
    选择
    +
    
    +
  • + +
  • + +
    选择
    +
    
    +
  • + +
  • + +
    选择
    +
    
    +
  • + +
  • + +
    警告
    +
    
    +
  • + +
  • + +
    删 除
    +
    
    +
  • + +
  • + +
    查看
    +
    
    +
  • + +
  • + +
    问号
    +
    
    +
  • + +
  • + +
    方块
    +
    
    +
  • + +
  • + +
    删除
    +
    
    +
  • + +
  • + +
    图片
    +
    
    +
  • + +
  • + +
    图片
    +
    
    +
  • + +
  • + +
    拖动位置
    +
    
    +
  • + +
  • + +
    add
    +
    
    +
  • + +
  • + +
    文本
    +
    
    +
  • + +
  • + +
    A
    +
    
    +
  • + +
  • + +
    文本
    +
    
    +
  • + +
  • + +
    右对齐
    +
    
    +
  • + +
  • + +
    左对齐
    +
    
    +
  • + +
  • + +
    居中
    +
    
    +
  • + +
  • + +
    add
    +
    
    +
  • + +
  • + +
    搜索
    +
    
    +
  • + +
  • + +
    导航
    +
    
    +
  • + +
  • + +
    加上
    +
    
    +
  • + +
  • + +
    检查
    +
    
    +
  • + +
  • + +
    减去
    +
    
    +
  • + +
  • + +
    箭头
    +
    
    +
  • + +
  • + +
    箭头
    +
    
    +
  • + +
  • + +
    箭头
    +
    
    +
  • + +
  • + +
    列表
    +
    
    +
  • + +
  • + +
    user
    +
    
    +
  • + +
  • + +
    Shopping cart, finance, business
    +
    
    +
  • + +
+
+

Unicode 引用

+
+ +

Unicode 是字体在网页端最原始的应用方式,特点是:

+
    +
  • 支持按字体的方式去动态调整图标大小,颜色等等。
  • +
  • 默认情况下不支持多色,直接添加多色图标会自动去色。
  • +
+
+

注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)

+
+

Unicode 使用步骤如下:

+

第一步:拷贝项目下面生成的 @font-face

+
@font-face {
+  font-family: 'iconfont';
+  src: url('iconfont.woff2?t=1638330949259') format('woff2'),
+       url('iconfont.woff?t=1638330949259') format('woff'),
+       url('iconfont.ttf?t=1638330949259') format('truetype');
+}
+
+

第二步:定义使用 iconfont 的样式

+
.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+

第三步:挑选相应图标并获取字体编码,应用于页面

+
+<span class="iconfont">&#x33;</span>
+
+
+

"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

+
+
+
+
+
    + +
  • + +
    + 直播 +
    +
    .icon-zhibo +
    +
  • + +
  • + +
    + 轮播 +
    +
    .icon-lunbo +
    +
  • + +
  • + +
    + new +
    +
    .icon-new +
    +
  • + +
  • + +
    + 会员 +
    +
    .icon-huiyuan +
    +
  • + +
  • + +
    + 商品 +
    +
    .icon-shangpin +
    +
  • + +
  • + +
    + 公告 +
    +
    .icon-gonggao1 +
    +
  • + +
  • + +
    + 魔方 +
    +
    .icon-mofang1 +
    +
  • + +
  • + +
    + arrange1 +
    +
    .icon-arrange1 +
    +
  • + +
  • + +
    + price +
    +
    .icon-price +
    +
  • + +
  • + +
    + arrange2 +
    +
    .icon-arrange2 +
    +
  • + +
  • + +
    + 公告 +
    +
    .icon-gonggao +
    +
  • + +
  • + +
    + 秒杀 +
    +
    .icon-miaosha +
    +
  • + +
  • + +
    + 折扣 +
    +
    .icon-zhekou +
    +
  • + +
  • + +
    + 拼团 +
    +
    .icon-pintuan +
    +
  • + +
  • + +
    + 秒杀1 +
    +
    .icon-miaosha1 +
    +
  • + +
  • + +
    + 新品 +
    +
    .icon-xinpin +
    +
  • + +
  • + +
    + 折扣1 +
    +
    .icon-zhekou1 +
    +
  • + +
  • + +
    + 头部 +
    +
    .icon-toubu +
    +
  • + +
  • + +
    + 拼团1 +
    +
    .icon-pintuan1 +
    +
  • + +
  • + +
    + 长方形 +
    +
    .icon-weibiaoti-zhuanhuan- +
    +
  • + +
  • + +
    + 空 +
    +
    .icon-kong +
    +
  • + +
  • + +
    + 优惠券3 +
    +
    .icon-youhuiquan3 +
    +
  • + +
  • + +
    + 优惠券4 +
    +
    .icon-youhuiquan4 +
    +
  • + +
  • + +
    + 优惠券2 +
    +
    .icon-youhuiquan2 +
    +
  • + +
  • + +
    + 优惠券1 +
    +
    .icon-youhuiquan1 +
    +
  • + +
  • + +
    + 卡片8 +
    +
    .icon-kapian8 +
    +
  • + +
  • + +
    + 卡片6 +
    +
    .icon-kapian6 +
    +
  • + +
  • + +
    + 卡片7 +
    +
    .icon-kapian7 +
    +
  • + +
  • + +
    + 卡片1 +
    +
    .icon-kapian1 +
    +
  • + +
  • + +
    + 卡片3 +
    +
    .icon-kapian3 +
    +
  • + +
  • + +
    + 卡片2 +
    +
    .icon-kapian2 +
    +
  • + +
  • + +
    + 卡片5 +
    +
    .icon-kapian5 +
    +
  • + +
  • + +
    + 卡片4 +
    +
    .icon-kapian4 +
    +
  • + +
  • + +
    + app +
    +
    .icon-app +
    +
  • + +
  • + +
    + 辅助分割 +
    +
    .icon-fuzhufenge +
    +
  • + +
  • + +
    + pc +
    +
    .icon-pc +
    +
  • + +
  • + +
    + h5 +
    +
    .icon-h5 +
    +
  • + +
  • + +
    + 图文 +
    +
    .icon-tuwen +
    +
  • + +
  • + +
    + 商品列表 +
    +
    .icon-shangpinliebiao +
    +
  • + +
  • + +
    + 类别列表 +
    +
    .icon-leibieliebiao +
    +
  • + +
  • + +
    + 视频 +
    +
    .icon-shipin +
    +
  • + +
  • + +
    + 图文导航 +
    +
    .icon-tuwendaohang +
    +
  • + +
  • + +
    + 自定义 +
    +
    .icon-zidingyi +
    +
  • + +
  • + +
    + 小程序 +
    +
    .icon-xiaochengxu +
    +
  • + +
  • + +
    + 图文列表 +
    +
    .icon-tuwenliebiao +
    +
  • + +
  • + +
    + 优惠券 +
    +
    .icon-youhuiquan +
    +
  • + +
  • + +
    + 文本 +
    +
    .icon-wenben2 +
    +
  • + +
  • + +
    + 品牌列表 +
    +
    .icon-pinpailiebiao +
    +
  • + +
  • + +
    + 店铺头部 +
    +
    .icon-dianputoubu +
    +
  • + +
  • + +
    + 魔方 +
    +
    .icon-mofang +
    +
  • + +
  • + +
    + 一行两个 +
    +
    .icon-yihangliangge +
    +
  • + +
  • + +
    + 一行三个 +
    +
    .icon-yihangsange +
    +
  • + +
  • + +
    + 一行四个 +
    +
    .icon-yihangsige +
    +
  • + +
  • + +
    + 一左两右 +
    +
    .icon-yizuoliangyou +
    +
  • + +
  • + +
    + 两行两个 +
    +
    .icon-lianghangliangge +
    +
  • + +
  • + +
    + 一上两下 +
    +
    .icon-yishangliangxia +
    +
  • + +
  • + +
    + close +
    +
    .icon-close +
    +
  • + +
  • + +
    + 替换图片 +
    +
    .icon-tihuantupian +
    +
  • + +
  • + +
    + 选择 +
    +
    .icon-xuanze +
    +
  • + +
  • + +
    + 选择 +
    +
    .icon-xuanze-danxuan +
    +
  • + +
  • + +
    + 选择 +
    +
    .icon-xuanze1 +
    +
  • + +
  • + +
    + 警告 +
    +
    .icon-jinggao +
    +
  • + +
  • + +
    + 删 除 +
    +
    .icon-shanchu1 +
    +
  • + +
  • + +
    + 查看 +
    +
    .icon-chakan +
    +
  • + +
  • + +
    + 问号 +
    +
    .icon-iconfontquestion +
    +
  • + +
  • + +
    + 方块 +
    +
    .icon-fangkuai +
    +
  • + +
  • + +
    + 删除 +
    +
    .icon-shanchu +
    +
  • + +
  • + +
    + 图片 +
    +
    .icon-tupian +
    +
  • + +
  • + +
    + 图片 +
    +
    .icon-tupian1 +
    +
  • + +
  • + +
    + 拖动位置 +
    +
    .icon-tuodongweizhi +
    +
  • + +
  • + +
    + add +
    +
    .icon-add2 +
    +
  • + +
  • + +
    + 文本 +
    +
    .icon-wenben +
    +
  • + +
  • + +
    + A +
    +
    .icon-A +
    +
  • + +
  • + +
    + 文本 +
    +
    .icon-wenben1 +
    +
  • + +
  • + +
    + 右对齐 +
    +
    .icon-youduiqi +
    +
  • + +
  • + +
    + 左对齐 +
    +
    .icon-zuoduiqi +
    +
  • + +
  • + +
    + 居中 +
    +
    .icon-juzhong +
    +
  • + +
  • + +
    + add +
    +
    .icon-add1 +
    +
  • + +
  • + +
    + 搜索 +
    +
    .icon-sousuo +
    +
  • + +
  • + +
    + 导航 +
    +
    .icon-arrow-up +
    +
  • + +
  • + +
    + 加上 +
    +
    .icon-add +
    +
  • + +
  • + +
    + 检查 +
    +
    .icon-success +
    +
  • + +
  • + +
    + 减去 +
    +
    .icon-subtract +
    +
  • + +
  • + +
    + 箭头 +
    +
    .icon-arrow-down +
    +
  • + +
  • + +
    + 箭头 +
    +
    .icon-arrow-right +
    +
  • + +
  • + +
    + 箭头 +
    +
    .icon-arrow-left +
    +
  • + +
  • + +
    + 列表 +
    +
    .icon-phone-menu +
    +
  • + +
  • + +
    + user +
    +
    .icon-user +
    +
  • + +
  • + +
    + Shopping cart, finance, business +
    +
    .icon-shoppingCart +
    +
  • + +
+
+

font-class 引用

+
+ +

font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。

+

与 Unicode 使用方式相比,具有如下特点:

+
    +
  • 相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。
  • +
  • 因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。
  • +
+

使用步骤如下:

+

第一步:引入项目下面生成的 fontclass 代码:

+
<link rel="stylesheet" href="./iconfont.css">
+
+

第二步:挑选相应图标并获取类名,应用于页面:

+
<span class="iconfont icon-xxx"></span>
+
+
+

" + iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

+
+
+
+
+
    + +
  • + +
    直播
    +
    #icon-zhibo
    +
  • + +
  • + +
    轮播
    +
    #icon-lunbo
    +
  • + +
  • + +
    new
    +
    #icon-new
    +
  • + +
  • + +
    会员
    +
    #icon-huiyuan
    +
  • + +
  • + +
    商品
    +
    #icon-shangpin
    +
  • + +
  • + +
    公告
    +
    #icon-gonggao1
    +
  • + +
  • + +
    魔方
    +
    #icon-mofang1
    +
  • + +
  • + +
    arrange1
    +
    #icon-arrange1
    +
  • + +
  • + +
    price
    +
    #icon-price
    +
  • + +
  • + +
    arrange2
    +
    #icon-arrange2
    +
  • + +
  • + +
    公告
    +
    #icon-gonggao
    +
  • + +
  • + +
    秒杀
    +
    #icon-miaosha
    +
  • + +
  • + +
    折扣
    +
    #icon-zhekou
    +
  • + +
  • + +
    拼团
    +
    #icon-pintuan
    +
  • + +
  • + +
    秒杀1
    +
    #icon-miaosha1
    +
  • + +
  • + +
    新品
    +
    #icon-xinpin
    +
  • + +
  • + +
    折扣1
    +
    #icon-zhekou1
    +
  • + +
  • + +
    头部
    +
    #icon-toubu
    +
  • + +
  • + +
    拼团1
    +
    #icon-pintuan1
    +
  • + +
  • + +
    长方形
    +
    #icon-weibiaoti-zhuanhuan-
    +
  • + +
  • + +
    +
    #icon-kong
    +
  • + +
  • + +
    优惠券3
    +
    #icon-youhuiquan3
    +
  • + +
  • + +
    优惠券4
    +
    #icon-youhuiquan4
    +
  • + +
  • + +
    优惠券2
    +
    #icon-youhuiquan2
    +
  • + +
  • + +
    优惠券1
    +
    #icon-youhuiquan1
    +
  • + +
  • + +
    卡片8
    +
    #icon-kapian8
    +
  • + +
  • + +
    卡片6
    +
    #icon-kapian6
    +
  • + +
  • + +
    卡片7
    +
    #icon-kapian7
    +
  • + +
  • + +
    卡片1
    +
    #icon-kapian1
    +
  • + +
  • + +
    卡片3
    +
    #icon-kapian3
    +
  • + +
  • + +
    卡片2
    +
    #icon-kapian2
    +
  • + +
  • + +
    卡片5
    +
    #icon-kapian5
    +
  • + +
  • + +
    卡片4
    +
    #icon-kapian4
    +
  • + +
  • + +
    app
    +
    #icon-app
    +
  • + +
  • + +
    辅助分割
    +
    #icon-fuzhufenge
    +
  • + +
  • + +
    pc
    +
    #icon-pc
    +
  • + +
  • + +
    h5
    +
    #icon-h5
    +
  • + +
  • + +
    图文
    +
    #icon-tuwen
    +
  • + +
  • + +
    商品列表
    +
    #icon-shangpinliebiao
    +
  • + +
  • + +
    类别列表
    +
    #icon-leibieliebiao
    +
  • + +
  • + +
    视频
    +
    #icon-shipin
    +
  • + +
  • + +
    图文导航
    +
    #icon-tuwendaohang
    +
  • + +
  • + +
    自定义
    +
    #icon-zidingyi
    +
  • + +
  • + +
    小程序
    +
    #icon-xiaochengxu
    +
  • + +
  • + +
    图文列表
    +
    #icon-tuwenliebiao
    +
  • + +
  • + +
    优惠券
    +
    #icon-youhuiquan
    +
  • + +
  • + +
    文本
    +
    #icon-wenben2
    +
  • + +
  • + +
    品牌列表
    +
    #icon-pinpailiebiao
    +
  • + +
  • + +
    店铺头部
    +
    #icon-dianputoubu
    +
  • + +
  • + +
    魔方
    +
    #icon-mofang
    +
  • + +
  • + +
    一行两个
    +
    #icon-yihangliangge
    +
  • + +
  • + +
    一行三个
    +
    #icon-yihangsange
    +
  • + +
  • + +
    一行四个
    +
    #icon-yihangsige
    +
  • + +
  • + +
    一左两右
    +
    #icon-yizuoliangyou
    +
  • + +
  • + +
    两行两个
    +
    #icon-lianghangliangge
    +
  • + +
  • + +
    一上两下
    +
    #icon-yishangliangxia
    +
  • + +
  • + +
    close
    +
    #icon-close
    +
  • + +
  • + +
    替换图片
    +
    #icon-tihuantupian
    +
  • + +
  • + +
    选择
    +
    #icon-xuanze
    +
  • + +
  • + +
    选择
    +
    #icon-xuanze-danxuan
    +
  • + +
  • + +
    选择
    +
    #icon-xuanze1
    +
  • + +
  • + +
    警告
    +
    #icon-jinggao
    +
  • + +
  • + +
    删 除
    +
    #icon-shanchu1
    +
  • + +
  • + +
    查看
    +
    #icon-chakan
    +
  • + +
  • + +
    问号
    +
    #icon-iconfontquestion
    +
  • + +
  • + +
    方块
    +
    #icon-fangkuai
    +
  • + +
  • + +
    删除
    +
    #icon-shanchu
    +
  • + +
  • + +
    图片
    +
    #icon-tupian
    +
  • + +
  • + +
    图片
    +
    #icon-tupian1
    +
  • + +
  • + +
    拖动位置
    +
    #icon-tuodongweizhi
    +
  • + +
  • + +
    add
    +
    #icon-add2
    +
  • + +
  • + +
    文本
    +
    #icon-wenben
    +
  • + +
  • + +
    A
    +
    #icon-A
    +
  • + +
  • + +
    文本
    +
    #icon-wenben1
    +
  • + +
  • + +
    右对齐
    +
    #icon-youduiqi
    +
  • + +
  • + +
    左对齐
    +
    #icon-zuoduiqi
    +
  • + +
  • + +
    居中
    +
    #icon-juzhong
    +
  • + +
  • + +
    add
    +
    #icon-add1
    +
  • + +
  • + +
    搜索
    +
    #icon-sousuo
    +
  • + +
  • + +
    导航
    +
    #icon-arrow-up
    +
  • + +
  • + +
    加上
    +
    #icon-add
    +
  • + +
  • + +
    检查
    +
    #icon-success
    +
  • + +
  • + +
    减去
    +
    #icon-subtract
    +
  • + +
  • + +
    箭头
    +
    #icon-arrow-down
    +
  • + +
  • + +
    箭头
    +
    #icon-arrow-right
    +
  • + +
  • + +
    箭头
    +
    #icon-arrow-left
    +
  • + +
  • + +
    列表
    +
    #icon-phone-menu
    +
  • + +
  • + +
    user
    +
    #icon-user
    +
  • + +
  • + +
    Shopping cart, finance, business
    +
    #icon-shoppingCart
    +
  • + +
+
+

Symbol 引用

+
+ +

这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇文章 + 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:

+
    +
  • 支持多色图标了,不再受单色限制。
  • +
  • 通过一些技巧,支持像字体那样,通过 font-size, color 来调整样式。
  • +
  • 兼容性较差,支持 IE9+,及现代浏览器。
  • +
  • 浏览器渲染 SVG 的性能一般,还不如 png。
  • +
+

使用步骤如下:

+

第一步:引入项目下面生成的 symbol 代码:

+
<script src="./iconfont.js"></script>
+
+

第二步:加入通用 CSS 代码(引入一次就行):

+
<style>
+.icon {
+  width: 1em;
+  height: 1em;
+  vertical-align: -0.15em;
+  fill: currentColor;
+  overflow: hidden;
+}
+</style>
+
+

第三步:挑选相应图标并获取类名,应用于页面:

+
<svg class="icon" aria-hidden="true">
+  <use xlink:href="#icon-xxx"></use>
+</svg>
+
+
+
+ +
+
+ + + diff --git a/src/components/canvas/assets/font_icon/iconfont.css b/src/components/canvas/assets/font_icon/iconfont.css new file mode 100644 index 0000000..5ab3e49 --- /dev/null +++ b/src/components/canvas/assets/font_icon/iconfont.css @@ -0,0 +1,371 @@ +@font-face { + font-family: "iconfont"; /* Project id 2224733 */ + src: url('iconfont.woff2?t=1638330949259') format('woff2'), + url('iconfont.woff?t=1638330949259') format('woff'), + url('iconfont.ttf?t=1638330949259') format('truetype'); +} + +.iconfont { + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-zhibo:before { + content: "\e7d5"; +} + +.icon-lunbo:before { + content: "\e683"; +} + +.icon-new:before { + content: "\e6db"; +} + +.icon-huiyuan:before { + content: "\e61f"; +} + +.icon-shangpin:before { + content: "\e676"; +} + +.icon-gonggao1:before { + content: "\e6f0"; +} + +.icon-mofang1:before { + content: "\e66f"; +} + +.icon-arrange1:before { + content: "\e601"; +} + +.icon-price:before { + content: "\e604"; +} + +.icon-arrange2:before { + content: "\e605"; +} + +.icon-gonggao:before { + content: "\ea7a"; +} + +.icon-miaosha:before { + content: "\e650"; +} + +.icon-zhekou:before { + content: "\e652"; +} + +.icon-pintuan:before { + content: "\e653"; +} + +.icon-miaosha1:before { + content: "\e64b"; +} + +.icon-xinpin:before { + content: "\e64c"; +} + +.icon-zhekou1:before { + content: "\e64d"; +} + +.icon-toubu:before { + content: "\e64e"; +} + +.icon-pintuan1:before { + content: "\e64f"; +} + +.icon-weibiaoti-zhuanhuan-:before { + content: "\e607"; +} + +.icon-kong:before { + content: "\e674"; +} + +.icon-youhuiquan3:before { + content: "\e621"; +} + +.icon-youhuiquan4:before { + content: "\e624"; +} + +.icon-youhuiquan2:before { + content: "\e625"; +} + +.icon-youhuiquan1:before { + content: "\e626"; +} + +.icon-kapian8:before { + content: "\e628"; +} + +.icon-kapian6:before { + content: "\e62a"; +} + +.icon-kapian7:before { + content: "\e62e"; +} + +.icon-kapian1:before { + content: "\e627"; +} + +.icon-kapian3:before { + content: "\e629"; +} + +.icon-kapian2:before { + content: "\e62b"; +} + +.icon-kapian5:before { + content: "\e62c"; +} + +.icon-kapian4:before { + content: "\e62f"; +} + +.icon-app:before { + content: "\e630"; +} + +.icon-fuzhufenge:before { + content: "\e631"; +} + +.icon-pc:before { + content: "\e632"; +} + +.icon-h5:before { + content: "\e634"; +} + +.icon-tuwen:before { + content: "\e635"; +} + +.icon-shangpinliebiao:before { + content: "\e636"; +} + +.icon-leibieliebiao:before { + content: "\e637"; +} + +.icon-shipin:before { + content: "\e638"; +} + +.icon-tuwendaohang:before { + content: "\e639"; +} + +.icon-zidingyi:before { + content: "\e63a"; +} + +.icon-xiaochengxu:before { + content: "\e63b"; +} + +.icon-tuwenliebiao:before { + content: "\e63c"; +} + +.icon-youhuiquan:before { + content: "\e63d"; +} + +.icon-wenben2:before { + content: "\e63e"; +} + +.icon-pinpailiebiao:before { + content: "\e640"; +} + +.icon-dianputoubu:before { + content: "\e641"; +} + +.icon-mofang:before { + content: "\e642"; +} + +.icon-yihangliangge:before { + content: "\e643"; +} + +.icon-yihangsange:before { + content: "\e644"; +} + +.icon-yihangsige:before { + content: "\e645"; +} + +.icon-yizuoliangyou:before { + content: "\e646"; +} + +.icon-lianghangliangge:before { + content: "\e647"; +} + +.icon-yishangliangxia:before { + content: "\e648"; +} + +.icon-close:before { + content: "\e602"; +} + +.icon-tihuantupian:before { + content: "\e66c"; +} + +.icon-xuanze:before { + content: "\e62d"; +} + +.icon-xuanze-danxuan:before { + content: "\e661"; +} + +.icon-xuanze1:before { + content: "\e618"; +} + +.icon-jinggao:before { + content: "\e608"; +} + +.icon-shanchu1:before { + content: "\e651"; +} + +.icon-chakan:before { + content: "\e622"; +} + +.icon-iconfontquestion:before { + content: "\e60a"; +} + +.icon-fangkuai:before { + content: "\e73f"; +} + +.icon-shanchu:before { + content: "\e633"; +} + +.icon-tupian:before { + content: "\e64a"; +} + +.icon-tupian1:before { + content: "\e61e"; +} + +.icon-tuodongweizhi:before { + content: "\e703"; +} + +.icon-add2:before { + content: "\e603"; +} + +.icon-wenben:before { + content: "\e649"; +} + +.icon-A:before { + content: "\e600"; +} + +.icon-wenben1:before { + content: "\e8c2"; +} + +.icon-youduiqi:before { + content: "\ec82"; +} + +.icon-zuoduiqi:before { + content: "\ec86"; +} + +.icon-juzhong:before { + content: "\e619"; +} + +.icon-add1:before { + content: "\e664"; +} + +.icon-sousuo:before { + content: "\e63f"; +} + +.icon-arrow-up:before { + content: "\e660"; +} + +.icon-add:before { + content: "\e685"; +} + +.icon-success:before { + content: "\e687"; +} + +.icon-subtract:before { + content: "\e68a"; +} + +/* .icon-arrow-down:before { + content: "\e695"; +} */ + +.icon-arrow-right:before { + content: "\e6ab"; +} + +.icon-arrow-left:before { + content: "\e6bc"; +} + +.icon-phone-menu:before { + content: "\e771"; +} + +.icon-user:before { + content: "\e67d"; +} + +.icon-shoppingCart:before { + content: "\e623"; +} + diff --git a/src/components/canvas/assets/font_icon/iconfont.eot b/src/components/canvas/assets/font_icon/iconfont.eot new file mode 100644 index 0000000..59f254e Binary files /dev/null and b/src/components/canvas/assets/font_icon/iconfont.eot differ diff --git a/src/components/canvas/assets/font_icon/iconfont.js b/src/components/canvas/assets/font_icon/iconfont.js new file mode 100644 index 0000000..153bb01 --- /dev/null +++ b/src/components/canvas/assets/font_icon/iconfont.js @@ -0,0 +1,64 @@ +!(function (h) { + var c, + l, + a, + v, + o, + t = + '', + i = (i = document.getElementsByTagName('script'))[ + i.length - 1 + ].getAttribute('data-injectcss'), + z = function (h, c) { + c.parentNode.insertBefore(h, c) + } + if (i && !h.__iconfont__svg__cssinject__) { + h.__iconfont__svg__cssinject__ = !0 + try { + document.write( + '' + ) + } catch (h) { + console && console.log(h) + } + } + function m() { + o || ((o = !0), a()) + } + function p() { + try { + v.documentElement.doScroll('left') + } catch (h) { + return void setTimeout(p, 50) + } + m() + } + ;(c = function () { + var h, c + ;((c = document.createElement('div')).innerHTML = t), + (t = null), + (h = c.getElementsByTagName('svg')[0]) && + (h.setAttribute('aria-hidden', 'true'), + (h.style.position = 'absolute'), + (h.style.width = 0), + (h.style.height = 0), + (h.style.overflow = 'hidden'), + (c = h), + (h = document.body).firstChild ? z(c, h.firstChild) : h.appendChild(c)) + }), + document.addEventListener + ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState) + ? setTimeout(c, 0) + : ((l = function () { + document.removeEventListener('DOMContentLoaded', l, !1), c() + }), + document.addEventListener('DOMContentLoaded', l, !1)) + : document.attachEvent && + ((a = c), + (v = h.document), + (o = !1), + p(), + (v.onreadystatechange = function () { + 'complete' == v.readyState && ((v.onreadystatechange = null), m()) + })) +})(window) diff --git a/src/components/canvas/assets/font_icon/iconfont.json b/src/components/canvas/assets/font_icon/iconfont.json new file mode 100644 index 0000000..4e893f5 --- /dev/null +++ b/src/components/canvas/assets/font_icon/iconfont.json @@ -0,0 +1,632 @@ +{ + "id": "2224733", + "name": "cereshop", + "font_family": "iconfont", + "css_prefix_text": "icon-", + "description": "", + "glyphs": [ + { + "icon_id": "8798014", + "name": "直播", + "font_class": "zhibo", + "unicode": "e7d5", + "unicode_decimal": 59349 + }, + { + "icon_id": "9468467", + "name": "轮播", + "font_class": "lunbo", + "unicode": "e683", + "unicode_decimal": 59011 + }, + { + "icon_id": "12598705", + "name": "new", + "font_class": "new", + "unicode": "e6db", + "unicode_decimal": 59099 + }, + { + "icon_id": "11219616", + "name": "会员", + "font_class": "huiyuan", + "unicode": "e61f", + "unicode_decimal": 58911 + }, + { + "icon_id": "8262494", + "name": "商品", + "font_class": "shangpin", + "unicode": "e676", + "unicode_decimal": 58998 + }, + { + "icon_id": "17004151", + "name": "公告", + "font_class": "gonggao1", + "unicode": "e6f0", + "unicode_decimal": 59120 + }, + { + "icon_id": "22142857", + "name": "魔方", + "font_class": "mofang1", + "unicode": "e66f", + "unicode_decimal": 58991 + }, + { + "icon_id": "23733851", + "name": "arrange1", + "font_class": "arrange1", + "unicode": "e601", + "unicode_decimal": 58881 + }, + { + "icon_id": "23733852", + "name": "price", + "font_class": "price", + "unicode": "e604", + "unicode_decimal": 58884 + }, + { + "icon_id": "23733853", + "name": "arrange2", + "font_class": "arrange2", + "unicode": "e605", + "unicode_decimal": 58885 + }, + { + "icon_id": "4609686", + "name": "公告", + "font_class": "gonggao", + "unicode": "ea7a", + "unicode_decimal": 60026 + }, + { + "icon_id": "19849914", + "name": "秒杀", + "font_class": "miaosha", + "unicode": "e650", + "unicode_decimal": 58960 + }, + { + "icon_id": "19849915", + "name": "折扣", + "font_class": "zhekou", + "unicode": "e652", + "unicode_decimal": 58962 + }, + { + "icon_id": "19849916", + "name": "拼团", + "font_class": "pintuan", + "unicode": "e653", + "unicode_decimal": 58963 + }, + { + "icon_id": "19827115", + "name": "秒杀1", + "font_class": "miaosha1", + "unicode": "e64b", + "unicode_decimal": 58955 + }, + { + "icon_id": "19827116", + "name": "新品", + "font_class": "xinpin", + "unicode": "e64c", + "unicode_decimal": 58956 + }, + { + "icon_id": "19827117", + "name": "折扣1", + "font_class": "zhekou1", + "unicode": "e64d", + "unicode_decimal": 58957 + }, + { + "icon_id": "19827118", + "name": "头部", + "font_class": "toubu", + "unicode": "e64e", + "unicode_decimal": 58958 + }, + { + "icon_id": "19827119", + "name": "拼团1", + "font_class": "pintuan1", + "unicode": "e64f", + "unicode_decimal": 58959 + }, + { + "icon_id": "11640000", + "name": "长方形", + "font_class": "weibiaoti-zhuanhuan-", + "unicode": "e607", + "unicode_decimal": 58887 + }, + { + "icon_id": "10541266", + "name": "空", + "font_class": "kong", + "unicode": "e674", + "unicode_decimal": 58996 + }, + { + "icon_id": "18863998", + "name": "优惠券3", + "font_class": "youhuiquan3", + "unicode": "e621", + "unicode_decimal": 58913 + }, + { + "icon_id": "18863999", + "name": "优惠券4", + "font_class": "youhuiquan4", + "unicode": "e624", + "unicode_decimal": 58916 + }, + { + "icon_id": "18864000", + "name": "优惠券2", + "font_class": "youhuiquan2", + "unicode": "e625", + "unicode_decimal": 58917 + }, + { + "icon_id": "18864001", + "name": "优惠券1", + "font_class": "youhuiquan1", + "unicode": "e626", + "unicode_decimal": 58918 + }, + { + "icon_id": "18870310", + "name": "卡片8", + "font_class": "kapian8", + "unicode": "e628", + "unicode_decimal": 58920 + }, + { + "icon_id": "18870312", + "name": "卡片6", + "font_class": "kapian6", + "unicode": "e62a", + "unicode_decimal": 58922 + }, + { + "icon_id": "18870314", + "name": "卡片7", + "font_class": "kapian7", + "unicode": "e62e", + "unicode_decimal": 58926 + }, + { + "icon_id": "18870683", + "name": "卡片1", + "font_class": "kapian1", + "unicode": "e627", + "unicode_decimal": 58919 + }, + { + "icon_id": "18870798", + "name": "卡片3", + "font_class": "kapian3", + "unicode": "e629", + "unicode_decimal": 58921 + }, + { + "icon_id": "18870799", + "name": "卡片2", + "font_class": "kapian2", + "unicode": "e62b", + "unicode_decimal": 58923 + }, + { + "icon_id": "18870800", + "name": "卡片5", + "font_class": "kapian5", + "unicode": "e62c", + "unicode_decimal": 58924 + }, + { + "icon_id": "18870801", + "name": "卡片4", + "font_class": "kapian4", + "unicode": "e62f", + "unicode_decimal": 58927 + }, + { + "icon_id": "18907727", + "name": "app", + "font_class": "app", + "unicode": "e630", + "unicode_decimal": 58928 + }, + { + "icon_id": "18907728", + "name": "辅助分割", + "font_class": "fuzhufenge", + "unicode": "e631", + "unicode_decimal": 58929 + }, + { + "icon_id": "18907729", + "name": "pc", + "font_class": "pc", + "unicode": "e632", + "unicode_decimal": 58930 + }, + { + "icon_id": "18907730", + "name": "h5", + "font_class": "h5", + "unicode": "e634", + "unicode_decimal": 58932 + }, + { + "icon_id": "18907732", + "name": "图文", + "font_class": "tuwen", + "unicode": "e635", + "unicode_decimal": 58933 + }, + { + "icon_id": "18907733", + "name": "商品列表", + "font_class": "shangpinliebiao", + "unicode": "e636", + "unicode_decimal": 58934 + }, + { + "icon_id": "18907734", + "name": "类别列表", + "font_class": "leibieliebiao", + "unicode": "e637", + "unicode_decimal": 58935 + }, + { + "icon_id": "18907735", + "name": "视频", + "font_class": "shipin", + "unicode": "e638", + "unicode_decimal": 58936 + }, + { + "icon_id": "18907736", + "name": "图文导航", + "font_class": "tuwendaohang", + "unicode": "e639", + "unicode_decimal": 58937 + }, + { + "icon_id": "18907737", + "name": "自定义", + "font_class": "zidingyi", + "unicode": "e63a", + "unicode_decimal": 58938 + }, + { + "icon_id": "18907738", + "name": "小程序", + "font_class": "xiaochengxu", + "unicode": "e63b", + "unicode_decimal": 58939 + }, + { + "icon_id": "18907739", + "name": "图文列表", + "font_class": "tuwenliebiao", + "unicode": "e63c", + "unicode_decimal": 58940 + }, + { + "icon_id": "18907741", + "name": "优惠券", + "font_class": "youhuiquan", + "unicode": "e63d", + "unicode_decimal": 58941 + }, + { + "icon_id": "18907742", + "name": "文本", + "font_class": "wenben2", + "unicode": "e63e", + "unicode_decimal": 58942 + }, + { + "icon_id": "18907743", + "name": "品牌列表", + "font_class": "pinpailiebiao", + "unicode": "e640", + "unicode_decimal": 58944 + }, + { + "icon_id": "18907805", + "name": "店铺头部", + "font_class": "dianputoubu", + "unicode": "e641", + "unicode_decimal": 58945 + }, + { + "icon_id": "18908808", + "name": "魔方", + "font_class": "mofang", + "unicode": "e642", + "unicode_decimal": 58946 + }, + { + "icon_id": "18908809", + "name": "一行两个", + "font_class": "yihangliangge", + "unicode": "e643", + "unicode_decimal": 58947 + }, + { + "icon_id": "18908810", + "name": "一行三个", + "font_class": "yihangsange", + "unicode": "e644", + "unicode_decimal": 58948 + }, + { + "icon_id": "18908811", + "name": "一行四个", + "font_class": "yihangsige", + "unicode": "e645", + "unicode_decimal": 58949 + }, + { + "icon_id": "18908812", + "name": "一左两右", + "font_class": "yizuoliangyou", + "unicode": "e646", + "unicode_decimal": 58950 + }, + { + "icon_id": "18908813", + "name": "两行两个", + "font_class": "lianghangliangge", + "unicode": "e647", + "unicode_decimal": 58951 + }, + { + "icon_id": "18908814", + "name": "一上两下", + "font_class": "yishangliangxia", + "unicode": "e648", + "unicode_decimal": 58952 + }, + { + "icon_id": "16963297", + "name": "close", + "font_class": "close", + "unicode": "e602", + "unicode_decimal": 58882 + }, + { + "icon_id": "1630982", + "name": "替换图片", + "font_class": "tihuantupian", + "unicode": "e66c", + "unicode_decimal": 58988 + }, + { + "icon_id": "1472518", + "name": "选择", + "font_class": "xuanze", + "unicode": "e62d", + "unicode_decimal": 58925 + }, + { + "icon_id": "2570139", + "name": "选择", + "font_class": "xuanze-danxuan", + "unicode": "e661", + "unicode_decimal": 58977 + }, + { + "icon_id": "16391281", + "name": "选择", + "font_class": "xuanze1", + "unicode": "e618", + "unicode_decimal": 58904 + }, + { + "icon_id": "15076931", + "name": "警告", + "font_class": "jinggao", + "unicode": "e608", + "unicode_decimal": 58888 + }, + { + "icon_id": "14404139", + "name": "删 除", + "font_class": "shanchu1", + "unicode": "e651", + "unicode_decimal": 58961 + }, + { + "icon_id": "8649511", + "name": "查看", + "font_class": "chakan", + "unicode": "e622", + "unicode_decimal": 58914 + }, + { + "icon_id": "584016", + "name": "问号", + "font_class": "iconfontquestion", + "unicode": "e60a", + "unicode_decimal": 58890 + }, + { + "icon_id": "14384498", + "name": "方块", + "font_class": "fangkuai", + "unicode": "e73f", + "unicode_decimal": 59199 + }, + { + "icon_id": "690725", + "name": "删除", + "font_class": "shanchu", + "unicode": "e633", + "unicode_decimal": 58931 + }, + { + "icon_id": "1172721", + "name": "图片", + "font_class": "tupian", + "unicode": "e64a", + "unicode_decimal": 58954 + }, + { + "icon_id": "6049692", + "name": "图片", + "font_class": "tupian1", + "unicode": "e61e", + "unicode_decimal": 58910 + }, + { + "icon_id": "15994506", + "name": "拖动位置", + "font_class": "tuodongweizhi", + "unicode": "e703", + "unicode_decimal": 59139 + }, + { + "icon_id": "12609224", + "name": "add", + "font_class": "add2", + "unicode": "e603", + "unicode_decimal": 58883 + }, + { + "icon_id": "2404491", + "name": "文本", + "font_class": "wenben", + "unicode": "e649", + "unicode_decimal": 58953 + }, + { + "icon_id": "9567573", + "name": "A", + "font_class": "A", + "unicode": "e600", + "unicode_decimal": 58880 + }, + { + "icon_id": "10885439", + "name": "文本", + "font_class": "wenben1", + "unicode": "e8c2", + "unicode_decimal": 59586 + }, + { + "icon_id": "6337463", + "name": "右对齐", + "font_class": "youduiqi", + "unicode": "ec82", + "unicode_decimal": 60546 + }, + { + "icon_id": "6337473", + "name": "左对齐", + "font_class": "zuoduiqi", + "unicode": "ec86", + "unicode_decimal": 60550 + }, + { + "icon_id": "11976280", + "name": "居中", + "font_class": "juzhong", + "unicode": "e619", + "unicode_decimal": 58905 + }, + { + "icon_id": "15838424", + "name": "add", + "font_class": "add1", + "unicode": "e664", + "unicode_decimal": 58980 + }, + { + "icon_id": "695192", + "name": "搜索", + "font_class": "sousuo", + "unicode": "e63f", + "unicode_decimal": 58943 + }, + { + "icon_id": "608218", + "name": "导航", + "font_class": "arrow-up", + "unicode": "e660", + "unicode_decimal": 58976 + }, + { + "icon_id": "608288", + "name": "加上", + "font_class": "add", + "unicode": "e685", + "unicode_decimal": 59013 + }, + { + "icon_id": "608290", + "name": "检查", + "font_class": "success", + "unicode": "e687", + "unicode_decimal": 59015 + }, + { + "icon_id": "608293", + "name": "减去", + "font_class": "subtract", + "unicode": "e68a", + "unicode_decimal": 59018 + }, + { + "icon_id": "608317", + "name": "箭头", + "font_class": "arrow-down", + "unicode": "e695", + "unicode_decimal": 59029 + }, + { + "icon_id": "608352", + "name": "箭头", + "font_class": "arrow-right", + "unicode": "e6ab", + "unicode_decimal": 59051 + }, + { + "icon_id": "609192", + "name": "箭头", + "font_class": "arrow-left", + "unicode": "e6bc", + "unicode_decimal": 59068 + }, + { + "icon_id": "609891", + "name": "列表", + "font_class": "phone-menu", + "unicode": "e771", + "unicode_decimal": 59249 + }, + { + "icon_id": "380396", + "name": "user", + "font_class": "user", + "unicode": "e67d", + "unicode_decimal": 59005 + }, + { + "icon_id": "10554762", + "name": "Shopping cart, finance, business", + "font_class": "shoppingCart", + "unicode": "e623", + "unicode_decimal": 58915 + } + ] +} diff --git a/src/components/canvas/assets/font_icon/iconfont.svg b/src/components/canvas/assets/font_icon/iconfont.svg new file mode 100644 index 0000000..de681f1 --- /dev/null +++ b/src/components/canvas/assets/font_icon/iconfont.svg @@ -0,0 +1,260 @@ + + + + + +Created by iconfont + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/canvas/assets/font_icon/iconfont.ttf b/src/components/canvas/assets/font_icon/iconfont.ttf new file mode 100644 index 0000000..6678cd6 Binary files /dev/null and b/src/components/canvas/assets/font_icon/iconfont.ttf differ diff --git a/src/components/canvas/assets/font_icon/iconfont.woff b/src/components/canvas/assets/font_icon/iconfont.woff new file mode 100644 index 0000000..a216213 Binary files /dev/null and b/src/components/canvas/assets/font_icon/iconfont.woff differ diff --git a/src/components/canvas/assets/font_icon/iconfont.woff2 b/src/components/canvas/assets/font_icon/iconfont.woff2 new file mode 100644 index 0000000..d61591b Binary files /dev/null and b/src/components/canvas/assets/font_icon/iconfont.woff2 differ diff --git a/src/components/canvas/components/Upload/index.vue b/src/components/canvas/components/Upload/index.vue new file mode 100644 index 0000000..edc7214 --- /dev/null +++ b/src/components/canvas/components/Upload/index.vue @@ -0,0 +1,383 @@ + + + + + diff --git a/src/components/canvas/components/canvasEditPage.vue b/src/components/canvas/components/canvasEditPage.vue new file mode 100644 index 0000000..5d29a81 --- /dev/null +++ b/src/components/canvas/components/canvasEditPage.vue @@ -0,0 +1,374 @@ + + + + + + + diff --git a/src/components/canvas/components/canvasShow/basics/assistDiv.vue b/src/components/canvas/components/canvasShow/basics/assistDiv.vue new file mode 100644 index 0000000..988c62b --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/assistDiv.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/src/components/canvas/components/canvasShow/basics/banner.vue b/src/components/canvas/components/canvasShow/basics/banner.vue new file mode 100644 index 0000000..22e2dc2 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/banner.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/src/components/canvas/components/canvasShow/basics/brandList.vue b/src/components/canvas/components/canvasShow/basics/brandList.vue new file mode 100644 index 0000000..d16bcfe --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/brandList.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/src/components/canvas/components/canvasShow/basics/categoryList.vue b/src/components/canvas/components/canvasShow/basics/categoryList.vue new file mode 100644 index 0000000..b41735a --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/categoryList.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/src/components/canvas/components/canvasShow/basics/coupon/index.vue b/src/components/canvas/components/canvasShow/basics/coupon/index.vue new file mode 100644 index 0000000..62bd6cf --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/coupon/index.vue @@ -0,0 +1,195 @@ + + + + diff --git a/src/components/canvas/components/canvasShow/basics/coupon/item.vue b/src/components/canvas/components/canvasShow/basics/coupon/item.vue new file mode 100644 index 0000000..beb65e8 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/coupon/item.vue @@ -0,0 +1,183 @@ + + + + diff --git a/src/components/canvas/components/canvasShow/basics/coupon/mixin.js b/src/components/canvas/components/canvasShow/basics/coupon/mixin.js new file mode 100644 index 0000000..2079ca8 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/coupon/mixin.js @@ -0,0 +1,138 @@ +import api from '../../config/api' +import { funMixin } from '../../config/mixin' +import { ref, onMounted, watch } from 'vue'; +import { canvasStore } from '@/components/canvas/store/canvas' +import { storeToRefs } from 'pinia'; +import canvasConfig from '../../config/config' +const canvasStoreObj = canvasStore(); + +export default function (componentContent, typeId, shopId) { + const { sendReq, beforeGetData, afterGetData, jumpStore } = funMixin() + const couponsData = ref([]) + const { couponNum } = storeToRefs(canvasStoreObj); + const isEdit = localStorage.getItem('isEdit') + + onMounted(() => { + getData() + }) + + // 获取优惠券列表 + function getData () { + if ( + componentContent.value.selectedCoupon && + componentContent.value.selectedCoupon.length > 0 + ) { + beforeGetData() + let _url = `${api.getCoupons}?isPage=2&ids=${componentContent.value.selectedCoupon}` + const params = { + method: 'GET', + url: _url, + } + sendReq( + params, + (res) => { + afterGetData() + couponsData.value = res.data.list + }, + () => { + afterGetData() + } + ) + } else { + couponsData.value = [] + } + } + + // 领取优惠券 + async function receiveCoupon (item) { + if (isEdit !== 'true') { + var paramsData = {} + var token = canvasConfig.getToken() + if (typeof uni !== 'undefined') { + if (token) { + if (typeId.value === 1) { + paramsData.couponId = item.couponId + } else if (typeId.value === 3) { + paramsData.shopCouponId = item.shopCouponId + paramsData.shopId = shopId.value + } + const params = { + url: api.takeCoupon, + method: 'POST', + data: paramsData, + } + sendReq(params).then(res => { + getData() + uni.showToast({ + title: '领取成功', + icon: 'success' + }) + }).catch(res => { + if (res.data.code !== '200') { + uni.showToast({ + title: res.data.message, + icon: 'none' + }) + } + }) + } else { + uni.showToast({ + title: '请先登录', + icon: 'none' + }) + uni.navigateTo({ + url: '/pages_category_page2/userModule/login' + }) + } + } else { + if (token) { + if (typeId.value === 1) { + paramsData.couponId = item.couponId + } else if (typeId.value === 3) { + paramsData.shopCouponId = item.shopCouponId + paramsData.shopId = shopId.value + } + const params = { + url: api.takeCoupon, + method: 'POST', + data: paramsData, + } + sendReq(params).then(res => { + ElMessage({ + message: '领取成功!', + type: 'success' + }) + getData() + }).catch(res => { + if (res.data.code !== '200') { + ElMessage({ + message: res.data.message, + type: 'success' + }) + } + }) + } else { + ElMessage({ + message: '请先登录' + }) + // 登录弹框 + // store.commit('IS_LOGIN', false) // 清除顶部个人中心数据 + // store.commit('SHOW_LOGIN') // 调用登录弹框 + } + } + } + } + + watch(() => + couponNum, + (newVal) => { + getData() + }, { immediate: false, deep: true }) + + return { + componentContent, + couponsData, + receiveCoupon, + jumpStore + } +} diff --git a/src/components/canvas/components/canvasShow/basics/custom.vue b/src/components/canvas/components/canvasShow/basics/custom.vue new file mode 100644 index 0000000..24a58cf --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/custom.vue @@ -0,0 +1,299 @@ + + + + + diff --git a/src/components/canvas/components/canvasShow/basics/discount/app/index.vue b/src/components/canvas/components/canvasShow/basics/discount/app/index.vue new file mode 100644 index 0000000..6e7c897 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/discount/app/index.vue @@ -0,0 +1,171 @@ + + + + diff --git a/src/components/canvas/components/canvasShow/basics/discount/mixin.js b/src/components/canvas/components/canvasShow/basics/discount/mixin.js new file mode 100644 index 0000000..1d60fa7 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/discount/mixin.js @@ -0,0 +1,117 @@ +import api from '../../config/api' +import { funMixin } from '../../config/mixin' +import { ref, onMounted, onBeforeUnmount, watch } from 'vue'; +import { canvasStore } from '@/components/canvas/store/canvas' +import { storeToRefs } from 'pinia'; +const canvasStoreObj = canvasStore(); + +export default function (componentContent, typeId, shopId) { + const { sendReq, beforeGetData, afterGetData, jumpProductDetail, jumpGroupWorks } = funMixin() + const { discountNum } = storeToRefs(canvasStoreObj); + const activityData = ref({}) + const productList = ref([]) + const count = ref([]) + const timer = ref(null) + const countDownInterval = ref(null) + + onMounted(() => { + if (componentContent.value.id) { + getProList() + getActivit() + } else { + productList.value = [] + } + }) + + onBeforeUnmount(() => { + clearInterval(timer.value) + }) + + function getProList () { + beforeGetData() + const params = { + method: 'POST', + url: api.getActivityProduct, + data: { + isPage: 2, + ids: [componentContent.value.id] + } + } + sendReq( + params, + (res) => { + afterGetData() + productList.value = res.data.list + }, + () => { + afterGetData() + } + ) + } + + function getActivit () { + beforeGetData() + const params = { + method: 'GET', + url: `${api.getActivity}?id=${componentContent.value.id}`, + } + sendReq( + params, + (res) => { + afterGetData() + activityData.value = res.data + getTime() + }, + () => { + afterGetData() + } + ) + } + + function getTime () { + const date = new Date().getTime() + let startTime = activityData.value.startTime + let endTime = activityData.value.endTime + let time = 0 + if (activityData.value.state === 0) { + time = startTime - date // 未开始 + } else if(activityData.value.state === 1) { + time = endTime - date // 进行中 + } + if(countDownInterval.value){ + clearInterval(countDownInterval.value) + } + countDownInterval.value = setInterval(()=>{ + countDown(time) + time -= 1000 + if(time <= 0){ + clearInterval(countDownInterval.value) + activityData.value.state ++ + } + },1000) + } + function countDown (time) { + const fn = (v) => (v < 10 ? `0${v}` : v) + const t = parseInt(time / 1000) + const text = activityData.value.state === 0 ? '开始' : '结束' + const hour = parseInt(t / 3600) + const min = parseInt((t % 3600) / 60) + const s = t % 60 + count.value = [text, fn(hour), fn(min), fn(s)] + } + + watch(() => + discountNum, + (newVal) => { + getProList() + getActivit() + }, { immediate: false, deep: true }) + + return { + activityData, + productList, + count, + jumpProductDetail, + jumpGroupWorks + } +} diff --git a/src/components/canvas/components/canvasShow/basics/group/app/index.vue b/src/components/canvas/components/canvasShow/basics/group/app/index.vue new file mode 100644 index 0000000..90a8a1a --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/group/app/index.vue @@ -0,0 +1,224 @@ + + + + diff --git a/src/components/canvas/components/canvasShow/basics/group/mixin.js b/src/components/canvas/components/canvasShow/basics/group/mixin.js new file mode 100644 index 0000000..3c87ade --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/group/mixin.js @@ -0,0 +1,75 @@ +import api from '../../config/api' +import { + funMixin +} from '../../config/mixin' +import { + ref, + watch, + onMounted +} from 'vue'; +import { + canvasStore +} from '@/components/canvas/store/canvas' +import { + storeToRefs +} from 'pinia'; +const canvasStoreObj = canvasStore(); + +export default function (componentContent, typeId, shopId) { + const { + sendReq, + beforeGetData, + afterGetData, + jumpProductDetail, + jumpGroupWorks + } = funMixin() + const productData = ref([]) + const { + groupNum + } = storeToRefs(canvasStoreObj); + + onMounted(() => { + getData() + }) + + function getData () { + if (componentContent.value.id) { + beforeGetData() + const params = { + method: 'POST', + url: api.getActivityProduct, + data: { + isPage: 2, + type: 1 + } + } + sendReq( + params, + (res) => { + afterGetData() + productData.value = res.data.list + }, + () => { + afterGetData() + } + ) + } else { + productData.value = [] + } + } + + watch(() => + groupNum, + (newVal) => { + getData() + }, { + immediate: false, + deep: true + }) + + return { + productData, + jumpProductDetail, + jumpGroupWorks + } +} diff --git a/src/components/canvas/components/canvasShow/basics/header/app/index.vue b/src/components/canvas/components/canvasShow/basics/header/app/index.vue new file mode 100644 index 0000000..4d648a7 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/header/app/index.vue @@ -0,0 +1,120 @@ + + + + diff --git a/src/components/canvas/components/canvasShow/basics/header/mixin.js b/src/components/canvas/components/canvasShow/basics/header/mixin.js new file mode 100644 index 0000000..2b58702 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/header/mixin.js @@ -0,0 +1,9 @@ +import { funMixin } from '../../config/mixin' + +export default function () { + const { jumpLink } = funMixin() + return { + jumpLink + } +} + diff --git a/src/components/canvas/components/canvasShow/basics/imageText.vue b/src/components/canvas/components/canvasShow/basics/imageText.vue new file mode 100644 index 0000000..75cbc27 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/imageText.vue @@ -0,0 +1,140 @@ + + + + + diff --git a/src/components/canvas/components/canvasShow/basics/imageTextList.vue b/src/components/canvas/components/canvasShow/basics/imageTextList.vue new file mode 100644 index 0000000..cfd1df3 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/imageTextList.vue @@ -0,0 +1,157 @@ + + + + + diff --git a/src/components/canvas/components/canvasShow/basics/imageTextNav.vue b/src/components/canvas/components/canvasShow/basics/imageTextNav.vue new file mode 100644 index 0000000..6e77010 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/imageTextNav.vue @@ -0,0 +1,101 @@ + + + + + diff --git a/src/components/canvas/components/canvasShow/basics/live/app/index.vue b/src/components/canvas/components/canvasShow/basics/live/app/index.vue new file mode 100644 index 0000000..ae5b6dc --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/live/app/index.vue @@ -0,0 +1,71 @@ + + + + diff --git a/src/components/canvas/components/canvasShow/basics/live/app/item.vue b/src/components/canvas/components/canvasShow/basics/live/app/item.vue new file mode 100644 index 0000000..527c0f3 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/live/app/item.vue @@ -0,0 +1,290 @@ + + + + + diff --git a/src/components/canvas/components/canvasShow/basics/live/mixin.js b/src/components/canvas/components/canvasShow/basics/live/mixin.js new file mode 100644 index 0000000..26d847f --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/live/mixin.js @@ -0,0 +1,118 @@ +import { + ref, + onMounted +} from 'vue'; +import { funMixin } from '../../config/mixin' + +export default function () { + const { jumpLive } = funMixin() + const appid = ref('wx2b03c6e691cd7370') + const roomId = ref([]) // 填写具体的房间号 + const roomList = ref([]) + + onMounted(() => { + getLiveRooms() + }) + + // 获取直播间列表 + function getLiveRooms () { + // Net.request('https://api.weixin.qq.com/wxa/business/getliveinfo?access_token=').then(res => {}) + const response = { + errcode: 0, // 错误码,0代表成功,1代表未创建直播间 + errmsg: 'ok', // 错误信息 + total: 1, + room_info: [{ + name: '直播房间名', + roomid: 1, + cover_img: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.eJnwPMdBIGhMob2NTkqGUAHaJa?pid=ImgDet&rs=1', + share_img: 'http://http://mmbiz.qpic.cn/mmbiz_jpgRl1RuuhdstSfZa8EEljedAYcbtX3Ejpdl2et1tPAQ37bdicnxoVialDLCKKDcPBy8Iic0kCiaiaalXg3EbpNKoicrweQ/0?wx_fmt=jpeg', + live_status: 101, + // "live_status": 101, // 直播间状态。101:直播中,102:未开始,103已结束,104禁播,105:暂停,106:异常,107:已过期 + start_time: 1568128900, // 直播间开始时间,列表按照start_time降序排列 + end_time: 1568131200, // 直播计划结束时间 + anchor_name: '里斯', + goods: [{ + cover_img: 'http://http://mmbiz.qpic.cn/mmbiz_jpg/Rl1RuuhdstSfZa8EEljedAYcbtX3Ejpdl2et1tPAQ37bdicnxoVialDLCKKDcPBy8Iic0kCiaiaalXg3EbpNKoicrweQ/0?wx_fmt=jpeg', + url: 'pages/index/index.html', + name: '茶杯', + price: 1889, // 价格(分) + price2: 0, + price_type: 1, // 价格类型,1:一口价(只需要传入price,price2不传) 2:价格区间(price字段为左边界,price2字段为右边界,price和price2必传) 3:显示折扣价(price字段为原价,price2字段为现价, price和price2必传) + goods_id: 256, // 商品id + third_party_appid: 'wx3d0fae56402d8a81', // 第三方商品appid ,当前小程序商品则为空 + },], + live_type: 0, // 直播类型,1 推流 0 手机直播 + close_like: 0, // 是否关闭点赞 【0:开启,1:关闭】(若关闭,观众端将隐藏点赞按钮,直播开始后不允许开启) + close_goods: 0, // 是否关闭货架 【0:开启,1:关闭】(若关闭,观众端将隐藏商品货架,直播开始后不允许开启) + close_comment: 0, // 是否关闭评论 【0:开启,1:关闭】(若关闭,观众端将隐藏评论入口,直播开始后不允许开启) + close_kf: 1, // 是否关闭客服 【0:开启,1:关闭】 默认关闭客服(直播开始后允许开启) + close_replay: 1, // 是否关闭回放 【0:开启,1:关闭】默认关闭回放(直播开始后允许开启) + is_feeds_public: 0, // 是否开启官方收录,1 开启,0 关闭 + creater_openid: 'oawjt4t9NWZV2BYaEPA89sh1XblE', // 创建者openid + feeds_img: 'XXX', // 官方收录封面 + }, + { + name: '直播房间名', + roomid: 2, + cover_img: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.eJnwPMdBIGhMob2NTkqGUAHaJa?pid=ImgDet&rs=1', + share_img: 'http://http://mmbiz.qpic.cn/mmbiz_jpgRl1RuuhdstSfZa8EEljedAYcbtX3Ejpdl2et1tPAQ37bdicnxoVialDLCKKDcPBy8Iic0kCiaiaalXg3EbpNKoicrweQ/0?wx_fmt=jpeg', + live_status: 102, + // "live_status": 101, // 直播间状态。101:直播中,102:未开始,103已结束,104禁播,105:暂停,106:异常,107:已过期 + start_time: 1639223017, // 直播间开始时间,列表按照start_time降序排列 + end_time: 1639200008, // 直播计划结束时间 + anchor_name: '里斯', + goods: [{ + cover_img: 'http://http://mmbiz.qpic.cn/mmbiz_jpg/Rl1RuuhdstSfZa8EEljedAYcbtX3Ejpdl2et1tPAQ37bdicnxoVialDLCKKDcPBy8Iic0kCiaiaalXg3EbpNKoicrweQ/0?wx_fmt=jpeg', + url: 'pages/index/index.html', + name: '茶杯', + price: 1889, // 价格(分) + price2: 0, + price_type: 1, // 价格类型,1:一口价(只需要传入price,price2不传) 2:价格区间(price字段为左边界,price2字段为右边界,price和price2必传) 3:显示折扣价(price字段为原价,price2字段为现价, price和price2必传) + goods_id: 256, // 商品id + third_party_appid: 'wx3d0fae56402d8a81', // 第三方商品appid ,当前小程序商品则为空 + },], + live_type: 0, // 直播类型,1 推流 0 手机直播 + close_like: 0, // 是否关闭点赞 【0:开启,1:关闭】(若关闭,观众端将隐藏点赞按钮,直播开始后不允许开启) + close_goods: 0, // 是否关闭货架 【0:开启,1:关闭】(若关闭,观众端将隐藏商品货架,直播开始后不允许开启) + close_comment: 0, // 是否关闭评论 【0:开启,1:关闭】(若关闭,观众端将隐藏评论入口,直播开始后不允许开启) + close_kf: 1, // 是否关闭客服 【0:开启,1:关闭】 默认关闭客服(直播开始后允许开启) + close_replay: 1, // 是否关闭回放 【0:开启,1:关闭】默认关闭回放(直播开始后允许开启) + is_feeds_public: 0, // 是否开启官方收录,1 开启,0 关闭 + creater_openid: 'oawjt4t9NWZV2BYaEPA89sh1XblE', // 创建者openid + feeds_img: 'XXX', // 官方收录封面 + }, + ], + } + roomList.value = response.room_info + } + + function toLiveRoom (item) { + roomId.value.push(item.roomid) + if (!appid.value || !roomId.value.length) { + return + } + // 路由参数 + const customParams = encodeURIComponent( + JSON.stringify({ + path: 'livePage/index', + pid: 1 + }) + ) + // let customParams + // 开发者在直播间页面路径上携带自定义参数(如示例中的path和pid参数),后续可以在分享卡片链接和跳转至商详页时获取,详见【获取自定义参数】、【直播间到商详页面携带参数】章节(上限600个字符,超过部分会被截断) + // #ifdef MP-WEIXIN + // eslint-disable-next-line no-undef + wx.navigateTo({ + url: `plugin-private://${appid.value}/pages/live-player-plugin?room_id=${roomId.value}&custom_params=${customParams}`, + }) + // #endif + } + + return { + appid, + roomId, + roomList, + toLiveRoom, + jumpLive + } +} diff --git a/src/components/canvas/components/canvasShow/basics/newProduct/app/index.vue b/src/components/canvas/components/canvasShow/basics/newProduct/app/index.vue new file mode 100644 index 0000000..165c8d5 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/newProduct/app/index.vue @@ -0,0 +1,182 @@ + + + + diff --git a/src/components/canvas/components/canvasShow/basics/newProduct/mixin.js b/src/components/canvas/components/canvasShow/basics/newProduct/mixin.js new file mode 100644 index 0000000..d07bbc9 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/newProduct/mixin.js @@ -0,0 +1,107 @@ +import api from '../../config/api' +import { + funMixin +} from '../../config/mixin' +import { + ref, + onMounted, + watch +} from 'vue'; +import { + canvasStore +} from '@/components/canvas/store/canvas' +import { + storeToRefs +} from 'pinia'; +const canvasStoreObj = canvasStore(); + +export default function (componentContent) { + const { + sendReq, + beforeGetData, + afterGetData, + jumpProductDetail, + jumpLink + } = funMixin() + const { + newProductNum + } = storeToRefs(canvasStoreObj); + const productData = ref([]) + + onMounted(() => { + getData(true) + }) + + function getData (isFirst) { + if (componentContent.value.productData.sourceType === '1') { + if ( + componentContent.value.productData.productIdList && + componentContent.value.productData.productIdList.length > 0 + ) { + beforeGetData() + sendReq({ + url: `${api.getProducts}?page=1&pageSize=99&ids=${componentContent.value.productData.productIdList}`, + method: 'GET', + }, + (proRes) => { + afterGetData() + productData.value = proRes.data.list + if (isFirst) { + componentContent.value.productData.imgTextData = productData.value + } + // $forceUpdate() // 刷新轮播图 + }, + () => { + afterGetData() + } + ) + } else { + productData.value = [] + } + } else if (componentContent.value.productData.sourceType === '2') { + if (componentContent.value.productData.categoryId) { + beforeGetData() + sendReq({ + url: `${api.getProducts}?page=1&pageSize=99&classifyId=${componentContent.value.productData.categoryId}`, + method: 'GET', + }, + (proRes) => { + afterGetData() + productData.value = proRes.data.list + if (isFirst) { + componentContent.value.productData.imgTextData = productData.value + } + // _.$forceUpdate() // 刷新轮播图 + }, + () => { + afterGetData() + } + ) + } else { + productData.value = { + products: [], + } + } + } + } + + watch(() => + newProductNum, + (newVal) => { + getData() + }, { + immediate: false, + deep: true + }) + + // const swiper = computed(()=>{ + // if (this.$refs.mySwiper) { + // return this.$refs.mySwiper.$swiper + // } + // }) + return { + productData, + jumpProductDetail, + jumpLink + } +} diff --git a/src/components/canvas/components/canvasShow/basics/notice.vue b/src/components/canvas/components/canvasShow/basics/notice.vue new file mode 100644 index 0000000..fc7247a --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/notice.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/src/components/canvas/components/canvasShow/basics/price/app/index.vue b/src/components/canvas/components/canvasShow/basics/price/app/index.vue new file mode 100644 index 0000000..073c240 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/price/app/index.vue @@ -0,0 +1,194 @@ + + + + diff --git a/src/components/canvas/components/canvasShow/basics/price/mixin.js b/src/components/canvas/components/canvasShow/basics/price/mixin.js new file mode 100644 index 0000000..edaba1b --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/price/mixin.js @@ -0,0 +1,81 @@ +import api from '../../config/api' +import { + funMixin +} from '../../config/mixin' +import { + ref, + onMounted, + watch +} from 'vue'; +import { + canvasStore +} from '@/components/canvas/store/canvas' +import { + storeToRefs +} from 'pinia'; +const canvasStoreObj = canvasStore(); + +export default function (componentContent, shopId) { + const { + sendReq, + beforeGetData, + afterGetData, + jumpProductDetail, + jumpPrice + } = funMixin() + const { + priceNum + } = storeToRefs(canvasStoreObj); + const productData = ref({ + composeProducts: [], + rules: [{ + price: null, + number: null, + }], + }) + + onMounted(() => { + getData(true) + }) + + function getData () { + if (componentContent.value.priceId) { + beforeGetData() + const params = { + method: 'GET', + url: `${api.getPrices}?shopId=${shopId.value}&ids=${componentContent.value.priceId}`, + } + sendReq( + params, + (res) => { + afterGetData() + if (res.data.length > 0) { + productData.value = res.data[0] + } + }, + () => { + afterGetData() + } + ) + } else { + productData.value = { + products: [], + } + } + } + + watch(() => + priceNum, + (newVal) => { + getData() + }, { + immediate: false, + deep: true + }) + + return { + productData, + jumpProductDetail, + jumpPrice + } +} diff --git a/src/components/canvas/components/canvasShow/basics/product/app/index.vue b/src/components/canvas/components/canvasShow/basics/product/app/index.vue new file mode 100644 index 0000000..8b861c2 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/product/app/index.vue @@ -0,0 +1,383 @@ + + + + diff --git a/src/components/canvas/components/canvasShow/basics/product/mixin.js b/src/components/canvas/components/canvasShow/basics/product/mixin.js new file mode 100644 index 0000000..1c2612d --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/product/mixin.js @@ -0,0 +1,92 @@ +import api from '../../config/api' +import { funMixin } from '../../config/mixin' +import { ref, onMounted, watch, onBeforeUnmount } from 'vue'; +import { canvasStore } from '@/components/canvas/store/canvas' +import { storeToRefs } from 'pinia'; +const canvasStoreObj = canvasStore(); + +export default function (componentContent) { + const { sendReq, beforeGetData, afterGetData, jumpProductDetail, jumpProList } = funMixin() + const { productNum } = storeToRefs(canvasStoreObj); + const productData = ref([]) + onMounted(() => { + getData(true) + }) + + function getData (isFirst) { + if (componentContent.value.productData.sourceType === '1') { + if ( + componentContent.value.productData.productIdList?.length > 0 + ) { + beforeGetData() + sendReq( + { + url: `${api.getProducts}?page=1&isPage=2&ids=${componentContent.value.productData.productIdList}`, + method: 'GET', + }, + (proRes) => { + afterGetData() + productData.value = proRes.data.list + if (isFirst) { + componentContent.value.productData.imgTextData = productData.value + } + }, + () => { + afterGetData() + } + ) + } else { + productData.value = [] + } + } else if (componentContent.value.productData.sourceType === '2') { + if (componentContent.value.productData?.categoryId) { + beforeGetData() + sendReq( + { + url: `${api.getProducts}?page=1&isPage=2&cateId=${componentContent.value.productData.categoryId}`, + method: 'GET', + }, + (proRes) => { + afterGetData() + productData.value = proRes.data.list + if (isFirst) { + componentContent.value.productData.imgTextData = productData.value + } + // _.swiper.update() + }, + () => { + afterGetData() + } + ) + } else { + productData.value = { + products: [], + } + } + } + } + + // 获取进度条数字 + function getPercentageNum(item){ + const total = item.campaignTotal || item.total + const stock = item.campaignStock || item.stock + return (total-stock)/total + } + + watch(() => + productNum, + (newVal) => { + getData() + }, { immediate: false, deep: true }) + // const swiper = computed(()=>{ + // if (this.$refs.mySwiper) { + // return this.$refs.mySwiper.$swiper + // } + // }) + return { + productData, + jumpProductDetail, + jumpProList, + getPercentageNum + } +} diff --git a/src/components/canvas/components/canvasShow/basics/shop.vue b/src/components/canvas/components/canvasShow/basics/shop.vue new file mode 100644 index 0000000..8433284 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/shop.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/src/components/canvas/components/canvasShow/basics/spike/app/index.vue b/src/components/canvas/components/canvasShow/basics/spike/app/index.vue new file mode 100644 index 0000000..b093068 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/spike/app/index.vue @@ -0,0 +1,171 @@ + + + + diff --git a/src/components/canvas/components/canvasShow/basics/spike/mixin.js b/src/components/canvas/components/canvasShow/basics/spike/mixin.js new file mode 100644 index 0000000..b8b55f6 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/spike/mixin.js @@ -0,0 +1,117 @@ +import api from '../../config/api' +import { funMixin } from '../../config/mixin' +import { ref, onMounted, onBeforeUnmount, watch } from 'vue'; +import { canvasStore } from '@/components/canvas/store/canvas' +import { storeToRefs } from 'pinia'; +const canvasStoreObj = canvasStore(); + +export default function (componentContent, typeId, shopId) { + const { sendReq, beforeGetData, afterGetData, jumpProductDetail, jumpSeckills } = funMixin() + const { spikeNum } = storeToRefs(canvasStoreObj); + const activityData = ref({}) + const productList = ref([]) + const count = ref([]) + const timer = ref(null) + const countDownInterval = ref(null) + + onMounted(() => { + if (componentContent.value.id) { + getProList() + getActivit() + } else { + productList.value = [] + } + }) + + onBeforeUnmount(() => { + clearInterval(timer.value) + }) + + function getProList () { + beforeGetData() + const params = { + method: 'POST', + url: api.getActivityProduct, + data: { + isPage: 2, + ids: [componentContent.value.id] + } + } + sendReq( + params, + (res) => { + afterGetData() + productList.value = res.data.list + }, + () => { + afterGetData() + } + ) + } + + function getActivit () { + beforeGetData() + const params = { + method: 'GET', + url: `${api.getActivity}?id=${componentContent.value.id}`, + } + sendReq( + params, + (res) => { + afterGetData() + activityData.value = res.data + getTime() + }, + () => { + afterGetData() + } + ) + } + + function getTime () { + const date = new Date().getTime() + let startTime = activityData.value.startTime + let endTime = activityData.value.endTime + let time = 0 + if (activityData.value.state === 0) { + time = startTime - date // 未开始 + } else if(activityData.value.state === 1) { + time = endTime - date // 进行中 + } + if(countDownInterval.value){ + clearInterval(countDownInterval.value) + } + countDownInterval.value = setInterval(()=>{ + countDown(time) + time -= 1000 + if(time <= 0){ + clearInterval(countDownInterval.value) + activityData.value.state ++ + } + },1000) + } + function countDown (time) { + const fn = (v) => (v < 10 ? `0${v}` : v) + const t = parseInt(time / 1000) + const text = activityData.value.state === 0 ? '开始' : '结束' + const hour = parseInt(t / 3600) + const min = parseInt((t % 3600) / 60) + const s = t % 60 + count.value = [text, fn(hour), fn(min), fn(s)] + } + + watch(() => + spikeNum, + (newVal) => { + getProList() + getActivit() + }, { immediate: false, deep: true }) + + return { + activityData, + productList, + count, + jumpProductDetail, + jumpSeckills + } +} diff --git a/src/components/canvas/components/canvasShow/basics/text.vue b/src/components/canvas/components/canvasShow/basics/text.vue new file mode 100644 index 0000000..df6f793 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/text.vue @@ -0,0 +1,106 @@ + + + + + diff --git a/src/components/canvas/components/canvasShow/basics/video.vue b/src/components/canvas/components/canvasShow/basics/video.vue new file mode 100644 index 0000000..021937c --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/video.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/src/components/canvas/components/canvasShow/basics/vip/app/index.vue b/src/components/canvas/components/canvasShow/basics/vip/app/index.vue new file mode 100644 index 0000000..80c1138 --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/vip/app/index.vue @@ -0,0 +1,224 @@ + + + + diff --git a/src/components/canvas/components/canvasShow/basics/vip/mixin.js b/src/components/canvas/components/canvasShow/basics/vip/mixin.js new file mode 100644 index 0000000..87ec45a --- /dev/null +++ b/src/components/canvas/components/canvasShow/basics/vip/mixin.js @@ -0,0 +1,36 @@ +import api from '../../config/api' +import { funMixin } from '../../config/mixin' +import { ref, onMounted } from 'vue'; + +const commonMixin = () => { + const { sendReq, beforeGetData, afterGetData, jumpVip, jumpProductDetail } = funMixin() + const productData = ref([]) + onMounted(() => { + getData() + }) + + function getData () { + beforeGetData() + sendReq( + { + url: `${api.getMemberProducts}?page=1&pageSize=20`, + method: 'GET', + }, + (proRes) => { + afterGetData() + productData.value = proRes.data.list + }, + () => { + afterGetData() + } + ) + } + + return { + productData, + jumpVip, + jumpProductDetail + } +} + +export default commonMixin diff --git a/src/components/canvas/components/canvasShow/canvasShowPage.vue b/src/components/canvas/components/canvasShow/canvasShowPage.vue new file mode 100644 index 0000000..c1c9d5c --- /dev/null +++ b/src/components/canvas/components/canvasShow/canvasShowPage.vue @@ -0,0 +1,83 @@ + + + + + + diff --git a/src/components/canvas/components/canvasShow/componentMap.js b/src/components/canvas/components/canvasShow/componentMap.js new file mode 100644 index 0000000..4640811 --- /dev/null +++ b/src/components/canvas/components/canvasShow/componentMap.js @@ -0,0 +1,48 @@ +import yHeader from './basics/header/app/index.vue' +import banner from './basics/banner.vue' +import text from './basics/text.vue' +import imageText from './basics/imageText.vue' +import brandList from './basics/brandList.vue' +import categoryList from './basics/categoryList.vue' +import imageTextList from './basics/imageTextList.vue' +import assistDiv from './basics/assistDiv.vue' +import imageTextNav from './basics/imageTextNav.vue' +import productList from './basics/product/app/index.vue' +import videoBox from './basics/video.vue' +import coupon from './basics/coupon/index.vue' +import custom from './basics/custom.vue' +import notice from './basics/notice.vue' +import vip from './basics/vip/app/index.vue' +import groupList from './basics/group/app/index.vue' +import spikeList from './basics/spike/app/index.vue' +import priceList from './basics/price/app/index.vue' +import discountList from './basics/discount/app/index.vue' +import newProduct from './basics/newProduct/app/index.vue' +import live from './basics/live/app/index.vue' +import shop from './basics/shop.vue' + +export const componentMap = { + 'header': yHeader, // 首页头部 + 'banner': banner, // 轮播图 + 'text': text, // 文本 + 'imageText': imageText, // 图文 + 'brandList': brandList, // 品牌列表 + 'categoryList': categoryList, // 类别列表 + 'imageTextList': imageTextList, // 图文列表 + 'assistDiv': assistDiv, // 铺助分割 + 'imageTextNav': imageTextNav, // 图文导航 + 'productList': productList, // 商品列表 + 'videoBox': videoBox, // 视频 + 'coupon': coupon, // 优惠券 + 'custom': custom, // 自定义 + 'notice': notice, // 公告 + 'vip': vip, // 会员专区 + 'groupList': groupList, // 拼团专区 + 'spikeList': spikeList, // 秒杀专区 + 'priceList': priceList, // 定价捆绑 + 'discountList': discountList, // 限时折扣 + 'newProduct': newProduct, // 每日上新 + 'live': live, // 直播 + 'shop': shop, // 每日好店 +} +export default componentMap diff --git a/src/components/canvas/components/canvasShow/config/api.js b/src/components/canvas/components/canvasShow/config/api.js new file mode 100644 index 0000000..f727bd3 --- /dev/null +++ b/src/components/canvas/components/canvasShow/config/api.js @@ -0,0 +1,23 @@ +// 导入api接口模块 + +// 获取当前环境变量 true => 生产环境 false => 开发环境 +const BASEURL = import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL +console.log(BASEURL,'BASEURL') +// const BASEURL = 'https://ceres.zkthink.com/api' // 移动端 + +export const api = { + // 画布模块 + fileUpload: import.meta.env.VITE_UPLOAD_URL, // 文件上传 + getClassify: BASEURL + '/product/category/tree', // 查询分类层级 + getProducts: BASEURL + '/product/store-product/canvas/page', // 选择商品查询 + saveCanvas: BASEURL + '/shop/canvas/update-json', // 保存画布 + getCanvas: BASEURL + '/shop/canvas/getDetail', // 读取画布 + getShops: BASEURL + '/canvas/getShops', // 选择店铺查询 + getCoupons: BASEURL + '/product/coupon/canvas/page', // 优惠券查询 + takeCoupon: BASEURL + '/product/coupon/relation/receive/', // 领取优惠券 + selectCanvasCustomList: BASEURL + '/canvas/selectCanvasCustomList', // 自定义页面查询 + getActivities: `${BASEURL}/product/campaign-info/canvas/page`, // 获取活动 + getActivityProduct: `${BASEURL}/product/campaign-info/canvas/product-page`, // 获取活动商品 + getActivity: `${BASEURL}/product/campaign-info/get`, // 获取单个活动 +} +export default api diff --git a/src/components/canvas/components/canvasShow/config/config.js b/src/components/canvas/components/canvasShow/config/config.js new file mode 100644 index 0000000..b2ee2d6 --- /dev/null +++ b/src/components/canvas/components/canvasShow/config/config.js @@ -0,0 +1,19 @@ +// 画布配置 +import Cookies from 'js-cookie' + +const config = { + terminal: 2, // 画布设备 1 小程序,2 H5,3 App 4 电脑 + typeId: 3, // 页面类型 0 PC端 1 平台画布,2 自定义页面,3 商家店铺装修 + getToken: function () { + // 平台端 + // return Cookies.get('cereShopAdminToken') + // 商家端 + return Cookies.get('cereShopBussesToken') + // PC端 + // return Cookies.get(‘token’) + // 移动端 + // return uni.getStorageSync('storage_key').token; + }, +} + +export default config diff --git a/src/components/canvas/components/canvasShow/config/mixin/funMixin.js b/src/components/canvas/components/canvasShow/config/mixin/funMixin.js new file mode 100644 index 0000000..a210545 --- /dev/null +++ b/src/components/canvas/components/canvasShow/config/mixin/funMixin.js @@ -0,0 +1,401 @@ +import sendReqMixin from './sendReqMixin' +import { useRouter } from 'vue-router' + +export default function () { + const router = useRouter() + const { sendReq } = sendReqMixin() + const isEdit = localStorage.getItem('isEdit') + // 请求数据前 请求完再显示所有组件 + function beforeGetData () { + if (typeof uni !== 'undefined') { + uni.getStorage({ + key: 'sendNum', + success: function (res) { + const sendNum = res.data + uni.setStorage({ key: 'sendNum', data: parseInt(sendNum) + 1 }) + }, + }) + } else { + const sendNum = localStorage.getItem('sendNum') + localStorage.setItem('sendNum', parseInt(sendNum) + 1) + } + } + // 请求数据后 + function afterGetData () { + if (typeof uni !== 'undefined') { + uni.getStorage({ + key: 'sendNum', + success: function (res) { + const sendNum = res.data + uni.setStorage({ key: 'sendNum', data: parseInt(sendNum) - 1 }) + }, + }) + } else { + const sendNum = localStorage.getItem('sendNum') + localStorage.setItem('sendNum', parseInt(sendNum) - 1) + } + } + // 判断url + function jumpLink (linkObj) { + if (isEdit !== 'true') { + var link = '' + if (typeof uni !== 'undefined') { + console.log(linkObj.data) + if (linkObj && linkObj.typeText && linkObj.data) { + switch (linkObj.typeText) { + case '类别': + this.jumpCategory(linkObj.data) + break + case '店辅': + this.jumpStore(linkObj.data) + break + case '商品': + this.jumpProductDetail(linkObj.data) + break + case '自定义': + // router.push("/category"); + break + case '公告': + this.jumpNoticeDetail(linkObj.data) + break + } + } else if (linkObj.selsectValue === '/index') { + uni.navigateTo({ + url: `/pages/index/index` + }) + } + return link + } else { + if (linkObj && linkObj.typeText && linkObj.data) { + const data = { + productId: linkObj.data.productId, + skuId: linkObj.data.skuId, + shopId: linkObj.data.shopId + } + switch (linkObj.typeText) { + case '类别': + router.push({ name: 'category', query: { classifyData: JSON.stringify(linkObj.data) }}) + break + case '店辅': + router.push({ + path: '/store', + query: { shopId: linkObj.data.shopId } + }); + break + case '商品': + router.push({ + path: '/productDetail', + query: { + proData: JSON.stringify(data) + } + }) + break + case '自定义': + // router.push("/activity/category"); + break + } + } else if (linkObj.selsectValue === '/index') { + router.push('/index'); + } + return link + } + } + } + // 跳转到类别主页 + function jumpCategory (item) { + if (isEdit !== 'true') { + if (typeof uni !== 'undefined') { + uni.navigateTo({ + url: `/pages_category_page1/goodsModule/goodsList?category3Id=${item.id}` + }) + } else { + router.push({ name: 'category', query: { classifyData: JSON.stringify(item) }}) + } + } + } + // 跳转到店铺主页 + function jumpStore (item) { + if (isEdit !== 'true') { + if (typeof uni !== 'undefined') { + uni.navigateTo({ + url: `/pages_category_page1/store/index?storeId=${item.shopId}` + }) + } else { + router.push({ + path: '/store', + query: { shopId: item.shopId } + }); + } + } + } + // 跳转到商品详情 + function jumpProductDetail (item) { + if (isEdit !== 'true') { + if (typeof uni !== 'undefined') { + uni.navigateTo({ + url: '/pages_category_page1/goodsModule/goodsDetails?shopId=' + item.shopId + '&productId=' + item.productId + '&skuId=' + item + .skuId + }) + } else { + const data = { + productId: item.productId, + skuId: item.skuId, + shopId: item.shopId + } + router.push({ + path: '/productDetail', + query: { + proData: JSON.stringify(data) + } + }); + } + } + } + // 跳转到秒杀专区 + function jumpSeckills (item, ids) { + if (isEdit !== 'true') { + if (typeof uni !== 'undefined') { + if (item.shopId) { + uni.navigateTo({ + url: '/pages_category_page1/discount/spikeList?shopId=' + item.shopId + '&shopSeckillId=' + item.shopSeckillId + }) + } else { + uni.navigateTo({ + url: '/pages_category_page1/discount/spikeList' + }) + } + } else { + if (item.shopId) { + router.push({ + path: '/activity/rabatt', + query: { shopId: item.shopId, ids: ids } + }); + } else { + router.push({ + path: '/activity/rabatt', + query: { id: item.seckillId } + }); + } + } + } + } + // 跳转到拼团专区 + function jumpGroupWorks (item) { + if (isEdit !== 'true') { + if (typeof uni !== 'undefined') { + if (item.shopId) { + uni.navigateTo({ + url: '/pages_category_page1/discount/groupBuy?shopId=' + item.shopId + '&shopGroupWorkId=' + item.shopGroupWorkId + }) + } else { + uni.navigateTo({ + url: '/pages_category_page1/discount/groupBuy?' + }) + } + } else { + if (item.shopId) { + router.push({ + path: '/activity/groupBuy', + query: { shopId: item.shopId, id: item.shopGroupWorkId } + }); + } else { + router.push({ + path: '/activity/groupBuy', + query: { id: item.groupWorkId } + }); + } + } + } + } + // 跳转到折扣专区 + function jumpDiscount (item) { + if (isEdit !== 'true') { + if (typeof uni !== 'undefined') { + if (item.shopId) { + if (item.shopDiscountId) { + uni.navigateTo({ + url: '/pages_category_page1/discount/discount?shopId=' + item.shopId + '&shopDiscountId=' + item.shopDiscountId + }) + } else { + uni.showToast({ + title: '暂无活动', + icon: 'none' + }); + } + } else { + if (item.discountId) { + uni.navigateTo({ + url: '/pages_category_page1/discount/platformDiscount?discountId=' + item.discountId + }) + } else { + uni.showToast({ + title: '暂无活动', + icon: 'none' + }); + } + } + } else { + if (item.shopId) { + router.push({ + path: '/activity/spitze', + query: { shopId: item.shopId, id: item.shopDiscountId } + }); + } else { + router.push({ + path: '/activity/spitze', + query: { id: item.discountId } + }); + } + } + } + } + // 跳转到会员专区 + function jumpVip () { + if (isEdit !== 'true') { + if (typeof uni !== 'undefined') { + uni.navigateTo({ + url: '/pages_category_page1/memberCenter/activityList', + success: res => {}, fail: () => {}, complete: () => {} + }) + } else { + router.push({ + path: '/activity/vip' + }); + } + } + } + // 定价捆绑跳转 + function jumpPrice (id) { + if (isEdit !== 'true') { + if (typeof uni !== 'undefined') { + console.log('移动端定价捆绑跳转') + } else { + router.push({ + path: '/activity/bind', + query: { + shopId: id + } + }); + } + } + } + // 跳转到公告详情 + function jumpNoticeDetail (item) { + if (isEdit !== 'true') { + if (typeof uni !== 'undefined') { + uni.navigateTo({ + url: '/pages_category_page2/userModule/messageDetail?noticeId=' + item.noticeId + }) + } else { + this.$router.push({ + path: '/activity/notificationDetails', + query: { + id: item.noticeId + } + }) + } + } + } + + // 跳转到画布产品列表 + function jumpProList (item) { + if (isEdit !== 'true') { + if (typeof uni !== 'undefined') { + if (item.sourceType === '1') { + uni.navigateTo({ + url: `/pages_category_page1/goodsModule/canvasGoods?sourceType=${item.sourceType}&ids=${item.productIdList}` + }) + } else if (item.sourceType === '2') { + uni.navigateTo({ + url: `/pages_category_page1/goodsModule/canvasGoods?sourceType=${item.sourceType}&classifyId=${item.categoryId}` + }) + } + } else { + if (item.sourceType === '1') { + router.push({ + path: '/canvasGoods', + query: { + sourceType: item.sourceType, + ids: item.productIdList.join(',') + } + }); + } else if (item.sourceType === '2') { + router.push({ + path: '/canvasGoods', + query: { + sourceType: item.sourceType, + classifyId: item.categoryId + } + }); + } + } + } + } + + // 查询产品 + function searchPro (key, type) { + if (isEdit !== 'true') { + if (typeof uni !== 'undefined') { + console.log('移动端查询') + } else { + if (this.$route.name !== 'search') { + this.$router.push({ + path: '/search', + query: { + keyword: key, + searchVal: type + } + }) + } else { + this.$emit('search', this.keyword, this.searchVal) + } + } + } + } + + // 跳转到直播列表 + function jumpLive () { + uni.navigateTo({ + url: '/pages_category_page2/livePage/index' + }) + } + + // 跳转组合支付 + function jumpCombination (item) { + if (item.priceId) { + uni.navigateTo({ + url: '/pages_category_page1/goodsModule/combination?priceId=' + item.priceId + }) + } else { + uni.showToast({ + title: '暂无活动', + icon: 'none' + }); + } + } + + // 加入购物车 + function addCart (id) { + console.log(id) + } + return { + sendReq, + beforeGetData, + afterGetData, + jumpLink, + jumpCategory, + jumpStore, + jumpProductDetail, + jumpSeckills, + jumpGroupWorks, + jumpDiscount, + jumpVip, + jumpNoticeDetail, + addCart, + jumpPrice, + jumpProList, + searchPro, + jumpLive, + jumpCombination + } +} diff --git a/src/components/canvas/components/canvasShow/config/mixin/index.js b/src/components/canvas/components/canvasShow/config/mixin/index.js new file mode 100644 index 0000000..87af19c --- /dev/null +++ b/src/components/canvas/components/canvasShow/config/mixin/index.js @@ -0,0 +1,4 @@ +import fun from './funMixin.js' +import sendReq from './sendReqMixin.js' +export const funMixin = fun +export const sendReqMixin = sendReq diff --git a/src/components/canvas/components/canvasShow/config/mixin/sendReqMixin.js b/src/components/canvas/components/canvasShow/config/mixin/sendReqMixin.js new file mode 100644 index 0000000..26c798d --- /dev/null +++ b/src/components/canvas/components/canvasShow/config/mixin/sendReqMixin.js @@ -0,0 +1,38 @@ +/* + * 发送请求 mixin + */ +import { ref } from 'vue'; +import request from './server' + +export default function () { + const loading = ref(false) + /* + * 发送请求 + */ + function sendReq (params, callback, errorCallback) { + request({ + method: params.method || 'POST', + url: params.url, + data: params.data || {}, + withCredentials: true, + headers: { + 'Content-type': + params.contentType || 'application/json;charset=utf-8', + }, + }) + .then((res) => { + if (res && res.data) { + callback && callback(res.data) + } + }) + .catch((err) => { + if (err) { + errorCallback && errorCallback(err) + } + }) + } + return { + loading, + sendReq + } +} diff --git a/src/components/canvas/components/canvasShow/config/mixin/server.js b/src/components/canvas/components/canvasShow/config/mixin/server.js new file mode 100644 index 0000000..bd51ecd --- /dev/null +++ b/src/components/canvas/components/canvasShow/config/mixin/server.js @@ -0,0 +1,108 @@ +// 引入axios +import axios from 'axios' +import canvasConfig from '../config' +import { getAccessToken, getRefreshToken, getTenantId, removeToken, setToken } from '@/utils/auth' +// const baseURL = "/api" +const tenantEnable = import.meta.env.VITE_APP_TENANT_ENABLE +const service = axios.create({ + headers: { + 'X-Requested-With': 'XMLHttpRequest', + }, + // baseURL, + withCredentials: true, + timeout: 20000, // 请求超时 20s +}) + +// 请求拦截器 +service.interceptors.request.use( + (config) => { + // 是否为当前的请求加上请求头 token + const token = getAccessToken() + if (token) { + config.headers['Authorization'] = 'Bearer ' + token + } + // 设置租户 + if (tenantEnable && tenantEnable === 'true') { + const tenantId = getTenantId() + config.headers['tenant-id'] = tenantId + } + return config + }, + (error) => { + return Promise.reject(error) + } +) + +// 响应拦截器 +service.interceptors.response.use( + (response) => { + if ( + response.data.code && + response.data.code !== '200' && + response.data.message + ) { + // Vue.prototype.$message.error(response.data.message) + } + return response + }, + (err) => { + // 失败响应 + if (err && err.response) { + switch (err.response.status) { + case 400: + err.message = '请求无效,请检查参数是否正确!' + break + + case 401: + err.message = '未经授权,访问被拒!' + break + + case 403: + err.message = '拒绝访问!' + break + + case 404: + err.message = `地址不存在!` + break + + case 408: + err.message = '请求超时!' + break + + case 500: + err.message = '系统错误!' + break + + case 501: + err.message = '该方法未实现!' + break + + case 502: + err.message = '网关出错!' + break + + case 503: + err.message = '服务不可用!' + break + + case 504: + err.message = '网关请求超时' + break + + case 505: + err.message = 'HTTP版本不受支持' + break + + default: + } + if (err.response.data.error) { + err.message = err.response.data.error + } + // Vue.prototype.$message.closeAll() + // Vue.prototype.$message.error(err.message) + // router.push({name: 'error', params: {message: err.message, status: err.response.status}}) + } + return Promise.reject(err) + } +) +export default service diff --git a/src/components/canvas/components/canvasShow/static/images/btn-next.png b/src/components/canvas/components/canvasShow/static/images/btn-next.png new file mode 100644 index 0000000..5c07fe4 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/btn-next.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/btn-next2.png b/src/components/canvas/components/canvasShow/static/images/btn-next2.png new file mode 100644 index 0000000..4649960 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/btn-next2.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/btn-prev.png b/src/components/canvas/components/canvasShow/static/images/btn-prev.png new file mode 100644 index 0000000..6d3396c Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/btn-prev.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/btn-prev2.png b/src/components/canvas/components/canvasShow/static/images/btn-prev2.png new file mode 100644 index 0000000..943df81 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/btn-prev2.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/coupon/bg-coupon.png b/src/components/canvas/components/canvasShow/static/images/coupon/bg-coupon.png new file mode 100644 index 0000000..9ae9aa8 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/coupon/bg-coupon.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/coupon/bg-coupon2.png b/src/components/canvas/components/canvasShow/static/images/coupon/bg-coupon2.png new file mode 100644 index 0000000..7f6f8d2 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/coupon/bg-coupon2.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/coupon/border_L1.png b/src/components/canvas/components/canvasShow/static/images/coupon/border_L1.png new file mode 100644 index 0000000..897ba05 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/coupon/border_L1.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/coupon/border_L2.png b/src/components/canvas/components/canvasShow/static/images/coupon/border_L2.png new file mode 100644 index 0000000..e69de29 diff --git a/src/components/canvas/components/canvasShow/static/images/coupon/border_L3.png b/src/components/canvas/components/canvasShow/static/images/coupon/border_L3.png new file mode 100644 index 0000000..e69de29 diff --git a/src/components/canvas/components/canvasShow/static/images/coupon/border_L4.png b/src/components/canvas/components/canvasShow/static/images/coupon/border_L4.png new file mode 100644 index 0000000..e69de29 diff --git a/src/components/canvas/components/canvasShow/static/images/coupon/border_R1.png b/src/components/canvas/components/canvasShow/static/images/coupon/border_R1.png new file mode 100644 index 0000000..e69de29 diff --git a/src/components/canvas/components/canvasShow/static/images/coupon/border_R2.png b/src/components/canvas/components/canvasShow/static/images/coupon/border_R2.png new file mode 100644 index 0000000..e69de29 diff --git a/src/components/canvas/components/canvasShow/static/images/coupon/border_R3.png b/src/components/canvas/components/canvasShow/static/images/coupon/border_R3.png new file mode 100644 index 0000000..e69de29 diff --git a/src/components/canvas/components/canvasShow/static/images/coupon/border_R4.png b/src/components/canvas/components/canvasShow/static/images/coupon/border_R4.png new file mode 100644 index 0000000..e69de29 diff --git a/src/components/canvas/components/canvasShow/static/images/coupon/flag-coupon-r.png b/src/components/canvas/components/canvasShow/static/images/coupon/flag-coupon-r.png new file mode 100644 index 0000000..59bbfd0 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/coupon/flag-coupon-r.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/coupon/flag-coupon.png b/src/components/canvas/components/canvasShow/static/images/coupon/flag-coupon.png new file mode 100644 index 0000000..c36ace8 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/coupon/flag-coupon.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/coupon/flag-coupon2-r.png b/src/components/canvas/components/canvasShow/static/images/coupon/flag-coupon2-r.png new file mode 100644 index 0000000..09663f9 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/coupon/flag-coupon2-r.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/coupon/flag-coupon2.png b/src/components/canvas/components/canvasShow/static/images/coupon/flag-coupon2.png new file mode 100644 index 0000000..76a0a90 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/coupon/flag-coupon2.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/discount/bg-discount-more.png b/src/components/canvas/components/canvasShow/static/images/discount/bg-discount-more.png new file mode 100644 index 0000000..402f303 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/discount/bg-discount-more.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/discount/bg-discount-top-text.png b/src/components/canvas/components/canvasShow/static/images/discount/bg-discount-top-text.png new file mode 100644 index 0000000..ebfeb24 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/discount/bg-discount-top-text.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/discount/bg-discount-top.png b/src/components/canvas/components/canvasShow/static/images/discount/bg-discount-top.png new file mode 100644 index 0000000..33553e6 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/discount/bg-discount-top.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/discount/flag-discount.png b/src/components/canvas/components/canvasShow/static/images/discount/flag-discount.png new file mode 100644 index 0000000..70b6e58 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/discount/flag-discount.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/discount/flag-discount2.png b/src/components/canvas/components/canvasShow/static/images/discount/flag-discount2.png new file mode 100644 index 0000000..b064899 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/discount/flag-discount2.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/discount/img-title.png b/src/components/canvas/components/canvasShow/static/images/discount/img-title.png new file mode 100644 index 0000000..33ce1aa Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/discount/img-title.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/group/flag-group.png b/src/components/canvas/components/canvasShow/static/images/group/flag-group.png new file mode 100644 index 0000000..1c038cb Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/group/flag-group.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/group/img-title.png b/src/components/canvas/components/canvasShow/static/images/group/img-title.png new file mode 100644 index 0000000..de13650 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/group/img-title.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/icon-title.png b/src/components/canvas/components/canvasShow/static/images/icon-title.png new file mode 100644 index 0000000..b223c1d Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/icon-title.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/live/huabei.png b/src/components/canvas/components/canvasShow/static/images/live/huabei.png new file mode 100644 index 0000000..5bb3212 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/live/huabei.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/live/icon-live-num.png b/src/components/canvas/components/canvasShow/static/images/live/icon-live-num.png new file mode 100644 index 0000000..b5ee396 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/live/icon-live-num.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/live/img-title.png b/src/components/canvas/components/canvasShow/static/images/live/img-title.png new file mode 100644 index 0000000..7aa092d Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/live/img-title.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/newProduct/bg-product-card.png b/src/components/canvas/components/canvasShow/static/images/newProduct/bg-product-card.png new file mode 100644 index 0000000..c01fe2c Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/newProduct/bg-product-card.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/newProduct/flag-new.png b/src/components/canvas/components/canvasShow/static/images/newProduct/flag-new.png new file mode 100644 index 0000000..0a5b3d5 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/newProduct/flag-new.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/notice/ico_notice.png b/src/components/canvas/components/canvasShow/static/images/notice/ico_notice.png new file mode 100644 index 0000000..1310ff6 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/notice/ico_notice.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/notice/ico_notice2.png b/src/components/canvas/components/canvasShow/static/images/notice/ico_notice2.png new file mode 100644 index 0000000..c2522bd Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/notice/ico_notice2.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/price/bg-discount.png b/src/components/canvas/components/canvasShow/static/images/price/bg-discount.png new file mode 100644 index 0000000..a3262b7 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/price/bg-discount.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/price/img-title.png b/src/components/canvas/components/canvasShow/static/images/price/img-title.png new file mode 100644 index 0000000..0c6d7fc Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/price/img-title.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/product/img-title.png b/src/components/canvas/components/canvasShow/static/images/product/img-title.png new file mode 100644 index 0000000..2c22013 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/product/img-title.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/shop/img-title.png b/src/components/canvas/components/canvasShow/static/images/shop/img-title.png new file mode 100644 index 0000000..d450f9a Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/shop/img-title.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/spike/bg-spike.png b/src/components/canvas/components/canvasShow/static/images/spike/bg-spike.png new file mode 100644 index 0000000..5717087 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/spike/bg-spike.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/spike/flag-spike.png b/src/components/canvas/components/canvasShow/static/images/spike/flag-spike.png new file mode 100644 index 0000000..389939a Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/spike/flag-spike.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/spike/img-title.png b/src/components/canvas/components/canvasShow/static/images/spike/img-title.png new file mode 100644 index 0000000..b5e117a Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/spike/img-title.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/spike/tit-spike.png b/src/components/canvas/components/canvasShow/static/images/spike/tit-spike.png new file mode 100644 index 0000000..89cfcca Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/spike/tit-spike.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/vip/flag-vip.png b/src/components/canvas/components/canvasShow/static/images/vip/flag-vip.png new file mode 100644 index 0000000..d01622f Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/vip/flag-vip.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/vip/flag-vip2.png b/src/components/canvas/components/canvasShow/static/images/vip/flag-vip2.png new file mode 100644 index 0000000..01b7102 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/vip/flag-vip2.png differ diff --git a/src/components/canvas/components/canvasShow/static/images/vip/img-title.png b/src/components/canvas/components/canvasShow/static/images/vip/img-title.png new file mode 100644 index 0000000..fd98e61 Binary files /dev/null and b/src/components/canvas/components/canvasShow/static/images/vip/img-title.png differ diff --git a/src/components/canvas/components/editor/index.vue b/src/components/canvas/components/editor/index.vue new file mode 100644 index 0000000..dbe2922 --- /dev/null +++ b/src/components/canvas/components/editor/index.vue @@ -0,0 +1,53 @@ + + + diff --git a/src/components/canvas/components/leftBar/panel.vue b/src/components/canvas/components/leftBar/panel.vue new file mode 100644 index 0000000..596e82b --- /dev/null +++ b/src/components/canvas/components/leftBar/panel.vue @@ -0,0 +1,220 @@ + + + + diff --git a/src/components/canvas/components/leftBar/panelList.js b/src/components/canvas/components/leftBar/panelList.js new file mode 100644 index 0000000..1a832f7 --- /dev/null +++ b/src/components/canvas/components/leftBar/panelList.js @@ -0,0 +1,505 @@ +// 导入api接口模块 +export const panelList = [ + { + title: '基础组件', + type: 1, + classList: [ + { + title: '商城头部', + iconClass: 'icon-dianputoubu', + type: 'header', + undraggable: true, // 不可拖动 + onlyAdmin: false, // 平台端显示 + onlyApp: true, // 只在app显示 + componentContent: { + type:1, + imageUrl: 'https://b2c-pro-static-dev.zkthink.com/static/images/logo.png', + keyList: [], + toggleTime: 2, + tabs: [] + }, + }, + { + title: '轮播图', + iconClass: 'icon-lunbo', + type: 'banner', + componentContent: { + height: 500, + bannerData: [ + { + bannerUrl: '', + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, + }, + ], + }, + }, + { + title: '标题文本', + iconClass: 'icon-wenben', + type: 'text', + componentContent: { + title: '标题', // 标题内容 + describe: '描述', // 描述内容 + textPos: 'left', // 文本对齐方向 + fontSizeNum: '16', // 文本字体大小 + describeSizeNum: '14', // 描述字体大小 + textFontW: 'normal', // 文本粗细 + describeFontW: 'normal', // 描述粗细 + titColor: '#333333', // 文本颜色 + describeColor: '#666666', // 描述颜色 + bgColor: '#FFFFFF', // 文本背景 + showLine: false, // 显示隐藏下划线 + showMore: false, // 显示隐藏更多 + styleValue: '1', // 查看更多样式 + link: '', // 查看更多链接 + }, + }, + // { + // title: '公告', + // iconClass: 'icon-gonggao1', + // type: 'notice', + // componentContent: { + // list: [{ + // title: '', + // link: { + // selectValue: '', + // selectName: '', + // typeText: '', + // url: '', + // } + // }] + // }, + // }, + { + title: '品牌列表', + iconClass: 'icon-pinpailiebiao', + type: 'brandList', + componentContent: { + title: '品牌列表', + imgList: [ + { + title: '标题一', + imgData: '', + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, + }, + { + title: '标题二', + imgData: '', + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, + }, + { + title: '标题三', + imgData: '', + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, + }, + { + title: '标题四', + imgData: '', + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, + }, + ], + imgCurrent: null, + showMore: false, // 显示隐藏更多 + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, // 查看更多链接 + }, + }, + { + title: '图文', + iconClass: 'icon-tuwen', + type: 'imageText', + componentContent: { + imageUrl: '', + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, + positionValue: 'left', + title: 'title', + content: '', + }, + }, + { + title: '图文列表', + iconClass: 'icon-tuwenliebiao', + type: 'imageTextList', + componentContent: { + title: '标题', + textAlign: 'left', + imgTextData: [ + { + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, + isShow: true, + title: '图文标题', + describe: '告别生活,畅享便携生活', + imgData: '', + }, + { + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, + isShow: true, + title: '图文标题', + text: '告别生活,畅享便携生活', + imgData: '', + }, + { + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, + isShow: true, + title: '图文标题', + describe: '告别生活,畅享便携生活', + imgData: '', + }, + ], + }, + }, + { + title: '图文导航', + iconClass: 'icon-tuwendaohang', + type: 'imageTextNav', + componentContent: { + imgTextData: [ + { + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, + title: '标题', + img: '', + }, + { + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, + title: '标题', + img: '', + }, + { + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, + title: '标题', + img: '', + }, + ], + }, + }, + { + title: '铺助分割', + iconClass: 'icon-fuzhufenge', + type: 'assistDiv', + componentContent: { + height: 30, + bgColor: '', + }, + }, + { + title: '自定义', + iconClass: 'icon-mofang1', + type: 'custom', + componentContent: { + layoutType: 'L1', + density: '4', + maxH: 0, + imgClearance: 0, + pageSpacing: 0, + averageBoxData: [], // 记录格子的激活状态 + imgBoxActive: 0, // 记录框的位置 + elementNum: 1, // 生成格子数量 + imgData: [ + { + src: '', + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, + }, + { + src: '', + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, + }, + ], + }, + }, + { + title: '视频', + iconClass: 'icon-shipin', + type: 'videoBox', + componentContent: { + title: '标题', + videoUrl: '', + mainBody: '描述', + coverImg: '', + }, + }, + { + title: '直播', + iconClass: 'icon-zhibo', + onlyAdmin: true, // 平台端显示 + onlyWeixin: true, // 只在小程序显示 + type: 'live', + componentContent: { + showMore: false, + }, + }, + ], + }, + { + title: '商品组件', + type: 1, + classList: [ + { + title: '商品列表', + iconClass: 'icon-shangpin', + type: 'productList', + componentContent: { + title: '商品列表', + productData: { + sourceType: '1', + categoryId: 0, + categoryName: '', + imgTextData: [], + productIdList: [], + }, + productRowNum: 1, // 展示行数 + productNum: 4, // 展示列数 + arrangeType: '多行多列', // 布局方式 + showMore: false, // 显示隐藏更多 + styleValue: '1', // 查看更多样式 + linkObj: { + selectValue: '', + selectName: '', + typeText: '', + url: '', + }, // 查看更多链接 + }, + }, + { + title: '类别列表', + iconClass: 'icon-leibieliebiao', + type: 'categoryList', + componentContent: { + title: '类别列表', + categoryData: [ + { + id: 1, + selClassData: [], + img: '', + }, + { + id: 2, + selClassData: [], + img: '', + }, + { + id: 3, + selClassData: [], + img: '', + }, + { + id: 4, + selClassData: [], + img: '', + }, + ], + textAlign: 'center', + }, + }, + ], + }, + { + title: '店铺组件', + type: 2, + classList: [ + { + title: '拼团专区', + iconClass: 'icon-pintuan1', + type: 'groupList', + componentContent: { + // title: '拼团专区', + id: '', + name: '', + productData: [], + productRowNum: 1, // 展示行数 + productNum: 4, // 展示列数 + arrangeType: '多行多列', // 布局方式 + showMore: false, // 显示隐藏更多 + styleValue: '1', // 查看更多样式 + }, + }, + { + title: '秒杀专区', + iconClass: 'icon-miaosha1', + type: 'spikeList', + componentContent: { + // title: '秒杀专区', + showMore: false, // 显示隐藏更多 + productData: [], + id: '', + name: '' + }, + }, + { + title: '限时折扣', + iconClass: 'icon-zhekou1', + type: 'discountList', + componentContent: { + // title: '限时折扣', + showMore: false, // 显示隐藏更多 + productData: [], + id: '', + name: '', + arrangeType: '多行多列', // 布局方式 + moreBg: '', + }, + }, + // { + // title: '定价捆绑', + // iconClass: 'icon-price', + // type: 'priceList', + // onlyMerchant: true, // 商家端显示 + // componentContent: { + // // title: '定价捆绑', + // productData: { + // composeProducts: [], + // }, + // productRowNum: 1, // 展示行数 + // productNum: 4, // 展示列数 + // arrangeType: '多行多列', // 布局方式 + // showMore: false, // 显示隐藏更多 + // styleValue: '1', // 查看更多样Z + // priceId: '', + // }, + // }, + // { + // title: '会员专区', + // iconClass: 'icon-huiyuan', + // type: 'vip', + // onlyAdmin: true, // 平台端显示 + // componentContent: { + // // title: '会员专区', + // productData: { + // productIdList: [], + // }, + // productRowNum: 1, // 展示行数 + // productNum: 4, // 展示列数 + // arrangeType: '多行多列', // 布局方式 + // showMore: false, // 显示隐藏更多 + // styleValue: '1', // 查看更多样式 + // }, + // }, + { + title: '优惠券', + iconClass: 'icon-youhuiquan', + type: 'coupon', + componentContent: { + arrangeActiveIndex: 2, + cardActiveIndex: 1, + colorActiveIndex: 0, + arrangeType: '一行一个', + selectedCoupon: [], + }, + }, + // { + // title: '每日上新', + // iconClass: 'icon-new', + // type: 'newProduct', + // onlyApp: true, // 只在app显示 + // componentContent: { + // productData: { + // sourceType: '1', + // imgTextData: [], + // productIdList: [], + // }, + // showMore: false, // 显示隐藏更多 + // styleValue: '1', // 查看更多样式 + // linkObj: { + // selectValue: '', + // selectName: '', + // typeText: '', + // url: '', + // }, // 查看更多链接 + // }, + // }, + // { + // title: '每日好店', + // iconClass: 'icon-toubu', + // type: 'shop', + // onlyApp: true, // 只在app显示 + // componentContent: { + // imgTextData: [ + // { + // linkObj: { + // selectValue: '', + // selectName: '', + // typeText: '', + // url: '', + // }, + // img: '', + // }, + // ], + // }, + // }, + ], + }, +] +export default panelList diff --git a/src/components/canvas/components/toolBar/BasicsComp/assistDiv.vue b/src/components/canvas/components/toolBar/BasicsComp/assistDiv.vue new file mode 100644 index 0000000..897a06d --- /dev/null +++ b/src/components/canvas/components/toolBar/BasicsComp/assistDiv.vue @@ -0,0 +1,139 @@ + + + + diff --git a/src/components/canvas/components/toolBar/BasicsComp/bannerTool.vue b/src/components/canvas/components/toolBar/BasicsComp/bannerTool.vue new file mode 100644 index 0000000..6d91115 --- /dev/null +++ b/src/components/canvas/components/toolBar/BasicsComp/bannerTool.vue @@ -0,0 +1,300 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/BasicsComp/brandList.vue b/src/components/canvas/components/toolBar/BasicsComp/brandList.vue new file mode 100644 index 0000000..0be7f37 --- /dev/null +++ b/src/components/canvas/components/toolBar/BasicsComp/brandList.vue @@ -0,0 +1,320 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/BasicsComp/customTool.vue b/src/components/canvas/components/toolBar/BasicsComp/customTool.vue new file mode 100644 index 0000000..88700b3 --- /dev/null +++ b/src/components/canvas/components/toolBar/BasicsComp/customTool.vue @@ -0,0 +1,1224 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/BasicsComp/headerTool.vue b/src/components/canvas/components/toolBar/BasicsComp/headerTool.vue new file mode 100644 index 0000000..8b51c88 --- /dev/null +++ b/src/components/canvas/components/toolBar/BasicsComp/headerTool.vue @@ -0,0 +1,207 @@ + + + + diff --git a/src/components/canvas/components/toolBar/BasicsComp/imageText.vue b/src/components/canvas/components/toolBar/BasicsComp/imageText.vue new file mode 100644 index 0000000..c0c5788 --- /dev/null +++ b/src/components/canvas/components/toolBar/BasicsComp/imageText.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/BasicsComp/imageTextList.vue b/src/components/canvas/components/toolBar/BasicsComp/imageTextList.vue new file mode 100644 index 0000000..5007ea2 --- /dev/null +++ b/src/components/canvas/components/toolBar/BasicsComp/imageTextList.vue @@ -0,0 +1,304 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/BasicsComp/imageTextNav.vue b/src/components/canvas/components/toolBar/BasicsComp/imageTextNav.vue new file mode 100644 index 0000000..4ee1f59 --- /dev/null +++ b/src/components/canvas/components/toolBar/BasicsComp/imageTextNav.vue @@ -0,0 +1,254 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/BasicsComp/noticeTool.vue b/src/components/canvas/components/toolBar/BasicsComp/noticeTool.vue new file mode 100644 index 0000000..d3189b6 --- /dev/null +++ b/src/components/canvas/components/toolBar/BasicsComp/noticeTool.vue @@ -0,0 +1,138 @@ + + + + diff --git a/src/components/canvas/components/toolBar/BasicsComp/shopTop.vue b/src/components/canvas/components/toolBar/BasicsComp/shopTop.vue new file mode 100644 index 0000000..320ad90 --- /dev/null +++ b/src/components/canvas/components/toolBar/BasicsComp/shopTop.vue @@ -0,0 +1,385 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/BasicsComp/textTool.vue b/src/components/canvas/components/toolBar/BasicsComp/textTool.vue new file mode 100644 index 0000000..046727d --- /dev/null +++ b/src/components/canvas/components/toolBar/BasicsComp/textTool.vue @@ -0,0 +1,365 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/BasicsComp/videoTool.vue b/src/components/canvas/components/toolBar/BasicsComp/videoTool.vue new file mode 100644 index 0000000..d627387 --- /dev/null +++ b/src/components/canvas/components/toolBar/BasicsComp/videoTool.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/MarketingComp/couponTool.vue b/src/components/canvas/components/toolBar/MarketingComp/couponTool.vue new file mode 100644 index 0000000..e87cec0 --- /dev/null +++ b/src/components/canvas/components/toolBar/MarketingComp/couponTool.vue @@ -0,0 +1,215 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/componentMap.js b/src/components/canvas/components/toolBar/componentMap.js new file mode 100755 index 0000000..76640e9 --- /dev/null +++ b/src/components/canvas/components/toolBar/componentMap.js @@ -0,0 +1,25 @@ +export const componentMap = new Map([ + ['header', () => import('./BasicsComp/headerTool.vue')], // 头部 + ['banner', () => import('./BasicsComp/bannerTool.vue')], // 轮播图 + ['text', () => import('./BasicsComp/textTool.vue')], // 文本 + ['videoBox', () => import('./BasicsComp/videoTool.vue')], // 视频控件 + ['imageText', () => import('./BasicsComp/imageText.vue')], // 图文控件 + ['imageTextNav', () => import('./BasicsComp/imageTextNav.vue')], // 图文导航 + ['assistDiv', () => import('./BasicsComp/assistDiv.vue')], // 铺助分割 + ['custom', () => import('./BasicsComp/customTool.vue')], // 自定义控件 + ['brandList', () => import('./BasicsComp/brandList.vue')], // 品牌列表 + ['imageTextList', () => import('./BasicsComp/imageTextList.vue')], // 图文列表 + ['notice', () => import('./BasicsComp/noticeTool.vue')], // 公告 + ['coupon', () => import('./MarketingComp/couponTool.vue')], // 优惠券 + ['categoryList', () => import('./goodsComp/categoryTool.vue')], // 类别列表 + ['productList', () => import('./goodsComp/productList.vue')], // 商品列表 + ['groupList', () => import('./shopComp/groupTool.vue')], // 拼团专区 + ['spikeList', () => import('./shopComp/spikeTool.vue')], // 秒杀专区 + ['priceList', () => import('./shopComp/priceTool.vue')], // 定价捆绑 + ['discountList', () => import('./shopComp/discountTool.vue')], // 折扣列表 + ['vip', () => import('./shopComp/vipTool.vue')], // 会员专区 + ['newProduct', () => import('./shopComp/newProductTool.vue')], // 会员专区 + ['live', () => import('./shopComp/liveTool.vue')], // 直播 + ['shop', () => import('./shopComp/shopTool.vue')], // 每日好店 +]) +export default componentMap diff --git a/src/components/canvas/components/toolBar/goodsComp/categoryTool.vue b/src/components/canvas/components/toolBar/goodsComp/categoryTool.vue new file mode 100644 index 0000000..63b34aa --- /dev/null +++ b/src/components/canvas/components/toolBar/goodsComp/categoryTool.vue @@ -0,0 +1,404 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/goodsComp/productList.vue b/src/components/canvas/components/toolBar/goodsComp/productList.vue new file mode 100644 index 0000000..36a629a --- /dev/null +++ b/src/components/canvas/components/toolBar/goodsComp/productList.vue @@ -0,0 +1,349 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/shopComp/discountTool.vue b/src/components/canvas/components/toolBar/shopComp/discountTool.vue new file mode 100644 index 0000000..402abea --- /dev/null +++ b/src/components/canvas/components/toolBar/shopComp/discountTool.vue @@ -0,0 +1,466 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/shopComp/groupTool.vue b/src/components/canvas/components/toolBar/shopComp/groupTool.vue new file mode 100644 index 0000000..df91631 --- /dev/null +++ b/src/components/canvas/components/toolBar/shopComp/groupTool.vue @@ -0,0 +1,460 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/shopComp/liveTool.vue b/src/components/canvas/components/toolBar/shopComp/liveTool.vue new file mode 100644 index 0000000..126d72f --- /dev/null +++ b/src/components/canvas/components/toolBar/shopComp/liveTool.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/shopComp/newProductTool.vue b/src/components/canvas/components/toolBar/shopComp/newProductTool.vue new file mode 100644 index 0000000..fb6ee75 --- /dev/null +++ b/src/components/canvas/components/toolBar/shopComp/newProductTool.vue @@ -0,0 +1,381 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/shopComp/priceTool.vue b/src/components/canvas/components/toolBar/shopComp/priceTool.vue new file mode 100644 index 0000000..43d2141 --- /dev/null +++ b/src/components/canvas/components/toolBar/shopComp/priceTool.vue @@ -0,0 +1,545 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/shopComp/shopTool.vue b/src/components/canvas/components/toolBar/shopComp/shopTool.vue new file mode 100644 index 0000000..52c1cda --- /dev/null +++ b/src/components/canvas/components/toolBar/shopComp/shopTool.vue @@ -0,0 +1,245 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/shopComp/spikeTool.vue b/src/components/canvas/components/toolBar/shopComp/spikeTool.vue new file mode 100644 index 0000000..4c51f64 --- /dev/null +++ b/src/components/canvas/components/toolBar/shopComp/spikeTool.vue @@ -0,0 +1,455 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/shopComp/vipTool.vue b/src/components/canvas/components/toolBar/shopComp/vipTool.vue new file mode 100644 index 0000000..534c2d0 --- /dev/null +++ b/src/components/canvas/components/toolBar/shopComp/vipTool.vue @@ -0,0 +1,370 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/toolModule/category-select.vue b/src/components/canvas/components/toolBar/toolModule/category-select.vue new file mode 100644 index 0000000..ca4ea33 --- /dev/null +++ b/src/components/canvas/components/toolBar/toolModule/category-select.vue @@ -0,0 +1,41 @@ + + + diff --git a/src/components/canvas/components/toolBar/toolModule/coupon-select.vue b/src/components/canvas/components/toolBar/toolModule/coupon-select.vue new file mode 100644 index 0000000..55e7b23 --- /dev/null +++ b/src/components/canvas/components/toolBar/toolModule/coupon-select.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/toolModule/custom-page-select.vue b/src/components/canvas/components/toolBar/toolModule/custom-page-select.vue new file mode 100644 index 0000000..987ca1a --- /dev/null +++ b/src/components/canvas/components/toolBar/toolModule/custom-page-select.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/toolModule/font-size-select.vue b/src/components/canvas/components/toolBar/toolModule/font-size-select.vue new file mode 100644 index 0000000..5a0a3e8 --- /dev/null +++ b/src/components/canvas/components/toolBar/toolModule/font-size-select.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/toolModule/notice-select.vue b/src/components/canvas/components/toolBar/toolModule/notice-select.vue new file mode 100644 index 0000000..8861e44 --- /dev/null +++ b/src/components/canvas/components/toolBar/toolModule/notice-select.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/toolModule/product-select.vue b/src/components/canvas/components/toolBar/toolModule/product-select.vue new file mode 100644 index 0000000..a4d36b9 --- /dev/null +++ b/src/components/canvas/components/toolBar/toolModule/product-select.vue @@ -0,0 +1,194 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/toolModule/product-source-category.vue b/src/components/canvas/components/toolBar/toolModule/product-source-category.vue new file mode 100644 index 0000000..6a2a2a2 --- /dev/null +++ b/src/components/canvas/components/toolBar/toolModule/product-source-category.vue @@ -0,0 +1,166 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/toolModule/product-source-multiple.vue b/src/components/canvas/components/toolBar/toolModule/product-source-multiple.vue new file mode 100644 index 0000000..d2aa3db --- /dev/null +++ b/src/components/canvas/components/toolBar/toolModule/product-source-multiple.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/toolModule/shop-select.vue b/src/components/canvas/components/toolBar/toolModule/shop-select.vue new file mode 100644 index 0000000..2f7c71e --- /dev/null +++ b/src/components/canvas/components/toolBar/toolModule/shop-select.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/toolModule/tool-coupon.vue b/src/components/canvas/components/toolBar/toolModule/tool-coupon.vue new file mode 100644 index 0000000..edef97d --- /dev/null +++ b/src/components/canvas/components/toolBar/toolModule/tool-coupon.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/toolModule/tool-product-source.vue b/src/components/canvas/components/toolBar/toolModule/tool-product-source.vue new file mode 100644 index 0000000..c0d0926 --- /dev/null +++ b/src/components/canvas/components/toolBar/toolModule/tool-product-source.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/toolModule/tool-select-category.vue b/src/components/canvas/components/toolBar/toolModule/tool-select-category.vue new file mode 100644 index 0000000..d7049fa --- /dev/null +++ b/src/components/canvas/components/toolBar/toolModule/tool-select-category.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/toolModule/tool-select-link.vue b/src/components/canvas/components/toolBar/toolModule/tool-select-link.vue new file mode 100644 index 0000000..e58c2e1 --- /dev/null +++ b/src/components/canvas/components/toolBar/toolModule/tool-select-link.vue @@ -0,0 +1,352 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/toolModule/tool-select.vue b/src/components/canvas/components/toolBar/toolModule/tool-select.vue new file mode 100644 index 0000000..9d2d719 --- /dev/null +++ b/src/components/canvas/components/toolBar/toolModule/tool-select.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/toolModule/tool-single-img.vue b/src/components/canvas/components/toolBar/toolModule/tool-single-img.vue new file mode 100644 index 0000000..b34192b --- /dev/null +++ b/src/components/canvas/components/toolBar/toolModule/tool-single-img.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/components/canvas/components/toolBar/toolPanel.vue b/src/components/canvas/components/toolBar/toolPanel.vue new file mode 100644 index 0000000..8b3e4b8 --- /dev/null +++ b/src/components/canvas/components/toolBar/toolPanel.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/src/components/canvas/config/common.js b/src/components/canvas/config/common.js new file mode 100755 index 0000000..259f03d --- /dev/null +++ b/src/components/canvas/config/common.js @@ -0,0 +1,62 @@ +/** + * 删除类别中的空 Child + * @param {className} class名称 + * @param {tagName} 标签名称 + */ +export function checkEmptyChild(arr) { + for (let i = 0; i < arr.length; i++) { + if (arr[i].children.length === 0) { + arr[i].children = '' + } else { + checkEmptyChild(arr[i].children) + } + } +} + + +/** + * 时间转换 + * @param {time} 时间 + * @param {pattern} 转换格式 + */ +export function parseTime(time, pattern) { + if (arguments.length === 0 || !time) { + return null + } + const format = pattern || '{y}/{m}/{d} {h}:{i}:{s}' + let date + if (typeof time === 'object') { + date = time + } else { + if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { + time = parseInt(time) + } else if (typeof time === 'string') { + time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.\d{3}/gm),''); + } + if ((typeof time === 'number') && (time.toString().length === 10)) { + time = time * 1000 + } + date = new Date(time) + } + const formatObj = { + y: date.getFullYear(), + m: date.getMonth() + 1, + d: date.getDate(), + h: date.getHours(), + i: date.getMinutes(), + s: date.getSeconds(), + a: date.getDay() + } + const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => { + let value = formatObj[key] + // Note: getDay() returns 0 on Sunday + if (key === 'a') { + return ['日', '一', '二', '三', '四', '五', '六'][value] + } + if (result.length > 0 && value < 10) { + value = '0' + value + } + return value || 0 + }) + return time_str +} diff --git a/src/components/canvas/config/mixin/index.js b/src/components/canvas/config/mixin/index.js new file mode 100755 index 0000000..1516ff1 --- /dev/null +++ b/src/components/canvas/config/mixin/index.js @@ -0,0 +1,2 @@ +import { tool } from './toolMixin.js' +export const toolMixin = { ...tool } diff --git a/src/components/canvas/config/mixin/toolMixin.js b/src/components/canvas/config/mixin/toolMixin.js new file mode 100755 index 0000000..4c2ea7a --- /dev/null +++ b/src/components/canvas/config/mixin/toolMixin.js @@ -0,0 +1,13 @@ +import { canvasStore } from '@/components/canvas/store/canvas' +import { storeToRefs } from 'pinia'; +const canvasStoreObj = canvasStore(); + +export default function () { + const { activeComponent, componentsData } = storeToRefs(canvasStoreObj); + const { setComponentsData } = canvasStoreObj; + return { + activeComponent, + componentsData, + setComponentsData + } +} diff --git a/src/components/canvas/config/rem.js b/src/components/canvas/config/rem.js new file mode 100755 index 0000000..3ff650f --- /dev/null +++ b/src/components/canvas/config/rem.js @@ -0,0 +1,55 @@ +(function (designWidth, maxWidth) { + var doc = document + var win = window + var docEl = doc.documentElement + var remStyle = document.createElement('style') + var tid + + function refreshRem () { + var width = docEl.getBoundingClientRect().width + maxWidth = maxWidth || 540 + width > maxWidth && (width = maxWidth) + var rem = (width * 100) / designWidth + remStyle.innerHTML = 'html{font-size:' + rem + 'px;}' + } + + if (docEl.firstElementChild) { + docEl.firstElementChild.appendChild(remStyle) + } else { + var wrap = doc.createElement('div') + wrap.appendChild(remStyle) + doc.write(wrap.innerHTML) + wrap = null + } + // 要等 wiewport 设置好后才能执行 refreshRem,不然 refreshRem 会执行2次; + // refreshRem() + + win.addEventListener( + 'resize', + function () { + clearTimeout(tid) // 防止执行两次 + tid = setTimeout(refreshRem, 300) + }, + false + ) + + win.addEventListener( + 'pageshow', + function (e) { + if (e.persisted) { + // 浏览器后退的时候重新计算 + clearTimeout(tid) + tid = setTimeout(refreshRem, 300) + } + }, + false + ) + + // if (doc.readyState === 'complete') { + // doc.body.style.fontSize = '16px' + // } else { + // doc.addEventListener('DOMContentLoaded', function (e) { + // doc.body.style.fontSize = '16px' + // }, false) + // } +})(1920, 1920) diff --git a/src/components/canvas/store/canvas.js b/src/components/canvas/store/canvas.js new file mode 100644 index 0000000..ec58b07 --- /dev/null +++ b/src/components/canvas/store/canvas.js @@ -0,0 +1,67 @@ +import { defineStore } from 'pinia' +import config from '@/components/canvas/components/canvasShow/config/config' + +export const canvasStore = defineStore({ + id: 'canvas', + state: () => ({ + terminal: config.terminal, // 画布设备 1 小程序,2 H5,3 App 4 电脑 + activeComponent: {}, // 选中模板数据 + componentsData: [], // 模板组件数据 + typeId: config.typeId, // 页面类型 1 平台画布,2 自定义页面,3 商家店铺装修 + couponNum: 0, + discountNum: 0, + groupNum: 0, + newProductNum: 0, + priceNum: 0, + productNum: 0, + spikeNum: 0, + }), + actions: { + setTerminal (data) { + this.terminal = data + }, + setActiveComponent (data) { + this.activeComponent = data + }, + setComponentsData (data) { + this.componentsData = data + }, + setTypeId (data) { + this.typeId = data + }, + setCouponNum () { + this.couponNum += 1 + }, + setDiscountNum () { + this.discountNum += 1 + }, + setGroupNum () { + this.groupNum += 1 + }, + setNewProductNum () { + this.newProductNum += 1 + }, + setPriceNum () { + this.priceNum += 1 + }, + setProductNum () { + this.productNum += 1 + }, + setSpikeNum () { + this.spikeNum += 1 + }, + }, + getters: { + getTerminal: (state) => state.terminal, + getActiveComponent: (state) => state.activeComponent, + getComponentsData: (state) => state.componentsData, + getTypeId: (state) => state.typeId, + getCouponNum: (state) => state.couponNum, + getDiscountNum: (state) => state.discountNum, + getGroupNum: (state) => state.groupNum, + getNewProductNum: (state) => state.newProductNum, + getPriceNum: (state) => state.priceNum, + getProductNum: (state) => state.productNum, + getSpikeNum: (state) => state.spikeNum + } +}) diff --git a/src/components/canvas/styles/index.scss b/src/components/canvas/styles/index.scss new file mode 100644 index 0000000..a13d7f1 --- /dev/null +++ b/src/components/canvas/styles/index.scss @@ -0,0 +1,257 @@ + + +// 总体body +body { + height: 100%; + // -webkit-user-select:none; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; + color: #333333; + font-size: 14px; +} + +#canvas,#app{ + height: 100%; +} + +label { + font-weight: 700; +} + +html { + height: 100%; + box-sizing: border-box; + -webkit-font-smoothing:antialiased; + font-size: 16px; +} + +#app { + height: 100%; + min-height: 100%; +} + +body, +h1, +h2, +h3, +h4, +h5, +h6, +p, +ul, +ol, +dl,dt,dd{ + /*We will be adding our own margin to these elements as needed.*/ + margin: 0; + /*You'll want to set font-size as needed.*/ + //font-size: 1rem; + /*No bold for h tags unless you want it*/ + font-weight: 400; + padding: 0; +} + +ul, +ol { + list-style: none; +} + +button { + // border: 0; + outline:none; +} + +input, +fieldset { + appearance: none; + border: 0; + padding: 0; + margin: 0; + /*inputs and fieldset defaults to having a min-width equal to its content in Chrome and Firefox (https://code.google.com/p/chromium/issues/detail?id=560762), we may not want that*/ + min-width: 0; + /*Reset the font size and family*/ + font-size: 1rem; + font-family: inherit; +} + +/* Switching user-select on for inputs and contenteditable specifically for Safari (see bug link above)*/ +input[type], +[contenteditable] { + user-select: text; +} + +/* For IE, we want to remove the default cross ('X') that appears in input fields when a user starts typing - Make sure you add your own! */ +input::-ms-clear { + display: none; +} + +/*This switches the default outline off when an input receives focus (really important for users tabbing through with a keyboard) so ensure you put something decent in for your input focus instead!!*/ +input:focus { + outline: 0; +} + +input[type="number"] { + /*Mozilla shows the spinner UI on number inputs unless we use this:*/ + -moz-appearance: textfield; +} + +/*Removes the little spinner controls for number type inputs (WebKit browsers/forks only)*/ +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + appearance: none; +} + +.clearfix:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden +} + +*, +*:before, +*:after { + box-sizing: inherit; +} + +.no-padding { + padding: 0px !important; +} + + +a:focus, +a:active { + outline: none; +} + +a, +a:focus, +a:hover { + cursor: pointer; + color: inherit; + text-decoration: none; +} + +div:focus { + outline: none; +} + +.w100{width: 100%;} + +// 盒子 +.box-container { + padding: 15px; +} + +// 边框1px +@media (-webkit-device-pixel-ratio: 2) { + .border-1px:after{ + height: 1px; + content: ''; + width: 100%; + border-bottom: 1px solid #e1e1e1; + position: absolute; + bottom: -1px; + right: 0; + transform: scaleY(0.5); + -webkit-transform: scaleY(0.5); + } +} + +@media (-webkit-min-device-pixel-ratio: 2){ + .border-bottom::after { + border-bottom-width: 1px; + } + .border-1px:after { + content: ' '; + display: block; + position: absolute; + top: 0; + right: -100%; + bottom: -100%; + left: 0; + border: 0 solid #e1e1e1; + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + pointer-events: none; + -webkit-transform: scale(.5); + transform: scale(.5); + width: 200%; + -webkit-box-sizing: border-box; + box-sizing: border-box; + } +} + +.module-box__title{ + font-size: 14px; + color: #666666; + height: 40px; + line-height: 40px; +} + +// el-silder +.numberGroup { + .title { + display: flex; + justify-content: space-between; + } + .el-slider{ + .el-slider__input{ + width: 50px; + } + .el-slider__runway{ + height: 4px; + margin: 18px 65px 18px 0; + } + .el-slider__bar { + height: 4px; + } + .el-slider__button-wrapper { + top: -17px; + } + .el-slider__button{ + width: 12px; + height: 12px; + } + .el-input-number.is-without-controls .el-input__wrapper{ + padding: 0; + } + } +} + +// 排列样式 +.styleSelectLine { + margin-top: 30px; + .blockTit { + span { + margin-right: 16px; + &:last-child { + color: var(--el-color-primary); + } + } + } + .composeList { + display: flex; + flex-wrap: wrap; + padding-top: 20px; + .item { + width: 50px; + height: 30px; + display: flex; + align-items: center; + justify-content: center; + border: 1px solid #e8eaec; + color: #999999; + font-size: 18px; + text-align: center; + cursor: pointer; + &:hover, + &.active { + color: var(--el-color-primary); + border: 1px solid var(--el-color-primary); + } + } + } +} diff --git a/src/components/canvas/views/index.vue b/src/components/canvas/views/index.vue new file mode 100644 index 0000000..8e259b8 --- /dev/null +++ b/src/components/canvas/views/index.vue @@ -0,0 +1,273 @@ + + + + + diff --git a/src/components/echarts/index.vue b/src/components/echarts/index.vue new file mode 100644 index 0000000..2ec90db --- /dev/null +++ b/src/components/echarts/index.vue @@ -0,0 +1,59 @@ + + + diff --git a/src/locales/en.ts b/src/locales/en.ts index 4f4d489..8bc5349 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -54,7 +54,8 @@ export default { updateTime: 'Update Time', copy: 'Copy', copySuccess: 'Copy Success', - copyError: 'Copy Error' + copyError: 'Copy Error', + setIndexMessage: 'Are you sure to set it as the homepage?', }, error: { noPermission: `Sorry, you don't have permission to access this page.`, @@ -182,6 +183,9 @@ export default { sunday: 'Sunday' }, workplace: { + dataTrendChart: 'Data trend chart', + userSessions: 'User Sessions', + orderTotalAmount:'Total order amount', welcome: 'Hello', happyDay: 'Wish you happy every day!', toady: `It's sunny today`, diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 97954dd..3cd12ea 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -54,7 +54,8 @@ export default { updateTime: '更新时间', copy: '复制', copySuccess: '复制成功', - copyError: '复制失败' + copyError: '复制失败', + setIndexMessage: '是否确认设为首页?', }, error: { noPermission: `抱歉,您无权访问此页面。`, @@ -182,6 +183,9 @@ export default { sunday: '周日' }, workplace: { + dataTrendChart: '数据趋势图', + userSessions: '访客量', + orderTotalAmount:'订单金额', welcome: '你好', happyDay: '祝你开心每一天!', toady: '今日晴', diff --git a/src/styles/index.scss b/src/styles/index.scss index 2781c12..b7b83a5 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -25,3 +25,8 @@ border-left-color: var(--el-color-primary); } } + +// 解决富文本编辑框行高异常问题 +.el-form-item .el-form-item__content .edui-default{ + line-height: normal; +} diff --git a/src/types/activity.ts b/src/types/activity.ts new file mode 100644 index 0000000..8421492 --- /dev/null +++ b/src/types/activity.ts @@ -0,0 +1,105 @@ +export interface ResponList { + list: T[] + total: number +} +export interface Detail { + productId: number; + skuId: number; + price: number; + discount: number; + stock: number; +} + +// 活动商品规格 +export interface SkuResp { + skuId: number + productId: number + sku?: string + image?: string + price: number + stock: number +} +// 新增活动 +export interface CreateActivity { + id: number | null + name: string; + type: number; + remark: string; + startTime: number | null; + endTime: number | null; + ifLimit: number; + limitNumber: number | null; + ifEnable: number; + ifAdd?: number; + person?: number | null; + effectiveTime?: number | null; + enableTime: number | null, + isVirtually?: number; + details: SkuResp[]; +} + +// 活动列表 +export interface ActivityList { + createTime: number; + endTime: number; + id: number; + name: string; + orderQuantity: number; + salesAmount: number; + salesQuantity: number; + startTime: number; + state: number; +} + + +// 活动列表参数 +export interface QueryParams { + pageNo: number + pageSize: number + name: string + createTime: any + type: number + state?: number | null +} +// 活动商品 +export interface ActivityProduct { + id: number | null + image: string + storeName: string + price: number + stock: number + specType: number + originalStock?: number + skus: SkuResp[] +} +// 活动商品数据列表 +export interface ActivityDataList { + skuId: number; + unique: string; + productName: string; + sku: string; + image: string; + dealAmount: number; + dealQuantity: number; + peopleNumber: number; + productQuantity: number; + averagePrice: number; +} + +// 拼团活动列表 +export interface GroupData { + id: number; + campaignId: number; + campaignDetailId: number; + joinNumber: number; + person: number; + state: number; + regimentalCommander: string; + createTime: string; +} +export interface GroupUserData { + nickname: string; + avatar: string; + orderId: string; + price: number; +} diff --git a/src/types/distributor.ts b/src/types/distributor.ts new file mode 100644 index 0000000..050a43b --- /dev/null +++ b/src/types/distributor.ts @@ -0,0 +1,127 @@ +export interface ResponList { + list: T[] + total: number +} +// 分销商列表 +export interface DistributorData { + userId: number; // 用户ID + realName: string; // 真实姓名 + levelId: number; // 等级ID + superiorId: number; // 上级ID + superiorName: string; // 上级名称 + address: string; // 地址 + reason: string; // 申请原因 + refuse: string; // 拒绝原因 + status: number; // 状态 -1-清退 0-待审核 1-已通过 2-已拒绝 + addUpAmount: number; // 累计金额 + addUpWages: number; // 累计佣金 + addUpUser: number; // 累计用户 + addUpDistributor: number; // 累计下级经销商 + id: number; // 主键 + createTime: string; // 创建时间 + firstWages: number; // 一级佣金比例 + secondWages: number; // 二级佣金比例 + userCount: number; // 团队人数 + p1UserCount: number; // 一级团队人数 + p2UserCount: number; // 二级团队人数 + firstDistributorCount: number; // 一级分销商数 + secondDistributorCount: number; // 二级佣金比例 + amountCount: number; // 团队分销金额 + orderCount: number; // 团队分销订单数 + firstAmountCount: number; // 一级分销商分销金额 + firstOrderCount: number; // 一级分销商订单数 + secondAmountCount: number; // 二级分销商分销金额 + secondOrderCount: number; // 二级分销商分销金额 +} + +// 分销商等级列表 +export interface LevelListItem { + level: number; // 等级,取值为 1-10 + name: string; // 等级名称 + firstWages: number; // 一级佣金比例 + secondWages: number; // 二级佣金比例 + thirdWages: number; // 三级佣金比例 + upType: number; // 升级类型,0-满足任意,1-满足全部 + userCount: number; // 人数,值为-1是未选中 + amount: number; // 金额,值为-1是未选中 + wages: number; // 佣金,值为-1是未选中 + id: number; // 主键 + createTime: string; // 创建时间 + count: number; // 分销商数量 +} + +// 创建分销商等级 +export interface CreateLevel { + level: number | null; // 等级,范围为 1-10 + name: string; // 等级名称 + firstWages: number; // 一级佣金比例 + secondWages: number; // 二级佣金比例 + thirdWages?: number; // 三级佣金比例 + upType: number; // 升级类型,0表示满足任意条件,1表示满足全部条件 + userCount: number; // 人数,-1表示未选中 + amount: number; // 金额,-1表示未选中 + wages: number; // 佣金,-1表示未选中 +} + +// 返回等级详情 +export interface LevelData { + level: number; // 等级 1-10 + name: string; // 等级名称 + firstWages: number; // 一级佣金比例 + secondWages: number; // 二级佣金比例 + thirdWages: number | null; // 三级佣金比例 + upType: number; // 升级类型 0-满足任意 1-满足全部 + userCount: number; // 人数 值为-1是未选中 + amount: number; // 金额 值为-1是未选中 + wages: number; // 佣金 值为-1是未选中 + id: number; // 主键 + createTime: string; // 创建时间 + count: number | null; // 分销商数量 +} + +// 分销商详情 +export interface DistributorDetail { + userId: number; // 用户ID + realName: string; // 真实姓名 + levelId: number; // 等级ID + superiorId?: number; // 上级ID + mobile?: number; // 手机号 + superiorName?: string; // 上级名称 + address: string; // 地址 + reason: string; // 申请原因 + refuse?: string; // 拒绝原因 + status: -1 | 0 | 1 | 2; // 状态 -1-清退 0-待审核 1-已通过 2-已拒绝 + addUpAmount: number; // 累计金额 + addUpWages: number; // 累计佣金 + addUpUser?: number; // 累计用户 + addUpDistributor?: number; // 累计下级经销商 + id: number; // 主键 + levelName?: string; // 分销商等级名称 + createTime: string; // 创建时间 + firstWages: number; // 一级佣金比例 + secondWages: number; // 二级佣金比例 + userCount: number; // 团队人数 + p1UserCount?: number; // 一级团队人数 + p2UserCount?: number; // 二级团队人数 + firstDistributorCount: number; // 一级分销商数 + secondDistributorCount?: number; // 二级分销商数 + amountCount?: number; // 团队分销金额 + orderCount?: number; // 团队分销订单数 + firstAmountCount?: number; // 一级分销商分销金额 + firstOrderCount?: number; // 一级分销商订单数 + secondAmountCount?: number; // 二级分销商分销金额 + secondOrderCount?: number; // 二级分销商分销金额 +} + +// 分销订单列表 + export interface DistributorList { + id: number; // 主键ID + orderId: string; // 订单ID + settlementTime: string; // 结算时间 + userName: string; // 用户名 + productPrice: number; // 产品价格 + distributorName: string; // 分销商名字 + amount: number; // 金额 + status: number; // 状态 + payTime: number | string; // 支付时间 +} diff --git a/src/types/product.ts b/src/types/product.ts new file mode 100644 index 0000000..b1fe98c --- /dev/null +++ b/src/types/product.ts @@ -0,0 +1,13 @@ +export interface Product { + createTime: number; + id: number; + image: string; + isDistribution: number; + isPostage: number; + isShow: number; + price: number; + sales: number; + stock: number; + storeName: string; + unitName: string; +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 03e17e7..130b07f 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -144,5 +144,18 @@ export enum DICT_TYPE { // ========== MP 模块 ========== MP_AUTO_REPLY_REQUEST_MATCH = 'mp_auto_reply_request_match', // 自动回复请求匹配类型 - MP_MESSAGE_TYPE = 'mp_message_type' // 消息类型 + MP_MESSAGE_TYPE = 'mp_message_type', // 消息类型 + + // ========== 营销模块 ========== + ACTIVITY_STATUS = 'activity_status', // 活动状态 + GROUP_STATUS = 'group_status', // 拼团状态 + + // ========== 分销模块 ========== + DISTRIBUTOR_STATUS = 'distributor_status', // 分销商状态 + ENTRYSTATUS = 'entryStatus', // 佣金入账状态 + COMMISSION_STATUS = 'commission_status', // 分销订单佣金状态 + DISTRIBUTOR_AGREEMENT='distributor_agreement', // 分销商协议 + DISTRIBUTOR_APPLY='distributor_apply',//分销商审核开关 + DISTRIBUTOR_PURCHASE='distributor_purchase',// 自购返佣 + DISTRIBUTOR_USER_EXPIRE='distributor_user_expire'// 分销商用户保护期 } diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue index 04d16bf..3b97979 100644 --- a/src/views/Home/Index.vue +++ b/src/views/Home/Index.vue @@ -47,7 +47,7 @@
- +
近七天订单数 @@ -77,6 +77,19 @@
+
+ + +
+ + +
+
+
diff --git a/src/views/Home/echarts-data.ts b/src/views/Home/echarts-data.ts index 56093f4..458a950 100644 --- a/src/views/Home/echarts-data.ts +++ b/src/views/Home/echarts-data.ts @@ -2,26 +2,13 @@ import { EChartsOption } from 'echarts' const { t } = useI18n() -export const lineOptions: EChartsOption = { +export const buryPointOptions: EChartsOption = { title: { text: t('analysis.monthlySales'), left: 'center' }, xAxis: { - data: [ - t('analysis.january'), - t('analysis.february'), - t('analysis.march'), - t('analysis.april'), - t('analysis.may'), - t('analysis.june'), - t('analysis.july'), - t('analysis.august'), - t('analysis.september'), - t('analysis.october'), - t('analysis.november'), - t('analysis.december') - ], + data: [], boundaryGap: false, axisTick: { show: false @@ -46,263 +33,61 @@ export const lineOptions: EChartsOption = { show: false } }, - legend: { - data: [t('analysis.estimate'), t('analysis.actual')], - top: 50 - }, series: [ { - name: t('analysis.estimate'), - smooth: true, - type: 'line', - data: [100, 120, 161, 134, 105, 160, 165, 114, 163, 185, 118, 123], - animationDuration: 2800, - animationEasing: 'cubicInOut' - }, - { - name: t('analysis.actual'), + name: t('workplace.userSessions'), smooth: true, type: 'line', itemStyle: {}, - data: [120, 82, 91, 154, 162, 140, 145, 250, 134, 56, 99, 123], + data: [], animationDuration: 2800, animationEasing: 'quadraticOut' } ] } -export const pieOptions: EChartsOption = { +export const storeOrderOptions: EChartsOption = { title: { - text: t('analysis.userAccessSource'), + text: t('analysis.monthlySales'), left: 'center' }, - tooltip: { - trigger: 'item', - formatter: '{a}
{b} : {c} ({d}%)' - }, - legend: { - orient: 'vertical', - left: 'left', - data: [ - t('analysis.directAccess'), - t('analysis.mailMarketing'), - t('analysis.allianceAdvertising'), - t('analysis.videoAdvertising'), - t('analysis.searchEngines') - ] - }, - series: [ - { - name: t('analysis.userAccessSource'), - type: 'pie', - radius: '55%', - center: ['50%', '60%'], - data: [ - { value: 335, name: t('analysis.directAccess') }, - { value: 310, name: t('analysis.mailMarketing') }, - { value: 234, name: t('analysis.allianceAdvertising') }, - { value: 135, name: t('analysis.videoAdvertising') }, - { value: 1548, name: t('analysis.searchEngines') } - ] + xAxis: { + data: [], + boundaryGap: false, + axisTick: { + show: false } - ] -} - -export const barOptions: EChartsOption = { - title: { - text: t('analysis.weeklyUserActivity'), - left: 'center' + }, + grid: { + left: 20, + right: 20, + bottom: 20, + top: 80, + containLabel: true }, tooltip: { trigger: 'axis', axisPointer: { - type: 'shadow' - } - }, - grid: { - left: 50, - right: 20, - bottom: 20 - }, - xAxis: { - type: 'category', - data: [ - t('analysis.monday'), - t('analysis.tuesday'), - t('analysis.wednesday'), - t('analysis.thursday'), - t('analysis.friday'), - t('analysis.saturday'), - t('analysis.sunday') - ], - axisTick: { - alignWithLabel: true - } + type: 'cross' + }, + padding: [5, 10] }, yAxis: { - type: 'value' + axisTick: { + show: false + } }, series: [ { - name: t('analysis.activeQuantity'), - data: [13253, 34235, 26321, 12340, 24643, 1322, 1324], - type: 'bar' + name: t('workplace.userSessions'), + smooth: true, + type: 'line', + itemStyle: {}, + data: [], + animationDuration: 2800, + animationEasing: 'quadraticOut' } ] } -export const radarOption: EChartsOption = { - legend: { - data: [t('workplace.personal'), t('workplace.team')] - }, - radar: { - // shape: 'circle', - indicator: [ - { name: t('workplace.quote'), max: 65 }, - { name: t('workplace.contribution'), max: 160 }, - { name: t('workplace.hot'), max: 300 }, - { name: t('workplace.yield'), max: 130 }, - { name: t('workplace.follow'), max: 100 } - ] - }, - series: [ - { - name: `xxx${t('workplace.index')}`, - type: 'radar', - data: [ - { - value: [42, 30, 20, 35, 80], - name: t('workplace.personal') - }, - { - value: [50, 140, 290, 100, 90], - name: t('workplace.team') - } - ] - } - ] -} -export const wordOptions = { - series: [ - { - type: 'wordCloud', - gridSize: 2, - sizeRange: [12, 50], - rotationRange: [-90, 90], - shape: 'pentagon', - width: 600, - height: 400, - drawOutOfBound: true, - textStyle: { - color: function () { - return ( - 'rgb(' + - [ - Math.round(Math.random() * 160), - Math.round(Math.random() * 160), - Math.round(Math.random() * 160) - ].join(',') + - ')' - ) - } - }, - emphasis: { - textStyle: { - shadowBlur: 10, - shadowColor: '#333' - } - }, - data: [ - { - name: 'Sam S Club', - value: 10000, - textStyle: { - color: 'black' - }, - emphasis: { - textStyle: { - color: 'red' - } - } - }, - { - name: 'Macys', - value: 6181 - }, - { - name: 'Amy Schumer', - value: 4386 - }, - { - name: 'Jurassic World', - value: 4055 - }, - { - name: 'Charter Communications', - value: 2467 - }, - { - name: 'Chick Fil A', - value: 2244 - }, - { - name: 'Planet Fitness', - value: 1898 - }, - { - name: 'Pitch Perfect', - value: 1484 - }, - { - name: 'Express', - value: 1112 - }, - { - name: 'Home', - value: 965 - }, - { - name: 'Johnny Depp', - value: 847 - }, - { - name: 'Lena Dunham', - value: 582 - }, - { - name: 'Lewis Hamilton', - value: 555 - }, - { - name: 'KXAN', - value: 550 - }, - { - name: 'Mary Ellen Mark', - value: 462 - }, - { - name: 'Farrah Abraham', - value: 366 - }, - { - name: 'Rita Ora', - value: 360 - }, - { - name: 'Serena Williams', - value: 282 - }, - { - name: 'NCAA baseball tournament', - value: 273 - }, - { - name: 'Point Break', - value: 265 - } - ] - } - ] -} diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue index 7895708..3faffe6 100644 --- a/src/views/Login/Login.vue +++ b/src/views/Login/Login.vue @@ -40,8 +40,8 @@
- - + +
@@ -54,9 +54,9 @@ 注册 --> - +
-
+ diff --git a/src/views/distributor/commission/index.vue b/src/views/distributor/commission/index.vue new file mode 100644 index 0000000..75490c5 --- /dev/null +++ b/src/views/distributor/commission/index.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/src/views/distributor/distributionConfig/index.vue b/src/views/distributor/distributionConfig/index.vue new file mode 100644 index 0000000..93f1a09 --- /dev/null +++ b/src/views/distributor/distributionConfig/index.vue @@ -0,0 +1,205 @@ + + + + + diff --git a/src/views/distributor/level/index.vue b/src/views/distributor/level/index.vue new file mode 100644 index 0000000..77fa0b0 --- /dev/null +++ b/src/views/distributor/level/index.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/src/views/distributor/level/levelForm.vue b/src/views/distributor/level/levelForm.vue new file mode 100644 index 0000000..4a1e661 --- /dev/null +++ b/src/views/distributor/level/levelForm.vue @@ -0,0 +1,287 @@ + + + + + diff --git a/src/views/distributor/merchant/components/AuditForm.vue b/src/views/distributor/merchant/components/AuditForm.vue new file mode 100644 index 0000000..cc63ced --- /dev/null +++ b/src/views/distributor/merchant/components/AuditForm.vue @@ -0,0 +1,71 @@ + + + diff --git a/src/views/distributor/merchant/index.vue b/src/views/distributor/merchant/index.vue new file mode 100644 index 0000000..7798b55 --- /dev/null +++ b/src/views/distributor/merchant/index.vue @@ -0,0 +1,368 @@ + + + + + diff --git a/src/views/distributor/order/components/OrderDetail.vue b/src/views/distributor/order/components/OrderDetail.vue new file mode 100644 index 0000000..f967cde --- /dev/null +++ b/src/views/distributor/order/components/OrderDetail.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/src/views/distributor/order/index.vue b/src/views/distributor/order/index.vue new file mode 100644 index 0000000..0efc049 --- /dev/null +++ b/src/views/distributor/order/index.vue @@ -0,0 +1,152 @@ + + + + + diff --git a/src/views/distributor/product/StoreProductForm.vue b/src/views/distributor/product/StoreProductForm.vue new file mode 100644 index 0000000..80d44cf --- /dev/null +++ b/src/views/distributor/product/StoreProductForm.vue @@ -0,0 +1,556 @@ + + + + diff --git a/src/views/distributor/product/index.vue b/src/views/distributor/product/index.vue new file mode 100644 index 0000000..63531aa --- /dev/null +++ b/src/views/distributor/product/index.vue @@ -0,0 +1,158 @@ + + + diff --git a/src/views/finance/recharge/component/RuleForm.vue b/src/views/finance/recharge/component/RuleForm.vue new file mode 100644 index 0000000..6867391 --- /dev/null +++ b/src/views/finance/recharge/component/RuleForm.vue @@ -0,0 +1,137 @@ + + + + + + diff --git a/src/views/finance/recharge/component/TableTab.vue b/src/views/finance/recharge/component/TableTab.vue new file mode 100644 index 0000000..e366430 --- /dev/null +++ b/src/views/finance/recharge/component/TableTab.vue @@ -0,0 +1,149 @@ + + + + + + diff --git a/src/views/finance/recharge/index.vue b/src/views/finance/recharge/index.vue new file mode 100644 index 0000000..499e7f6 --- /dev/null +++ b/src/views/finance/recharge/index.vue @@ -0,0 +1,44 @@ + + + + + + diff --git a/src/views/finance/withdraw/component/Audit.vue b/src/views/finance/withdraw/component/Audit.vue new file mode 100644 index 0000000..8a70ec5 --- /dev/null +++ b/src/views/finance/withdraw/component/Audit.vue @@ -0,0 +1,81 @@ + + + + + + diff --git a/src/views/finance/withdraw/component/Detail.vue b/src/views/finance/withdraw/component/Detail.vue new file mode 100644 index 0000000..8925456 --- /dev/null +++ b/src/views/finance/withdraw/component/Detail.vue @@ -0,0 +1,53 @@ + + + + + + diff --git a/src/views/finance/withdraw/index.vue b/src/views/finance/withdraw/index.vue new file mode 100644 index 0000000..866e13f --- /dev/null +++ b/src/views/finance/withdraw/index.vue @@ -0,0 +1,198 @@ + + + + + + diff --git a/src/views/mall/decoration/adverts/advertsForm.vue b/src/views/mall/decoration/adverts/advertsForm.vue new file mode 100644 index 0000000..02ab289 --- /dev/null +++ b/src/views/mall/decoration/adverts/advertsForm.vue @@ -0,0 +1,161 @@ + + diff --git a/src/views/mall/decoration/adverts/index.vue b/src/views/mall/decoration/adverts/index.vue new file mode 100644 index 0000000..9c666fe --- /dev/null +++ b/src/views/mall/decoration/adverts/index.vue @@ -0,0 +1,180 @@ + + + diff --git a/src/views/mall/decoration/adverts/linkConfig.vue b/src/views/mall/decoration/adverts/linkConfig.vue new file mode 100644 index 0000000..db58e3b --- /dev/null +++ b/src/views/mall/decoration/adverts/linkConfig.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/src/views/mall/decoration/canvas/canvasForm.vue b/src/views/mall/decoration/canvas/canvasForm.vue new file mode 100644 index 0000000..1aafef5 --- /dev/null +++ b/src/views/mall/decoration/canvas/canvasForm.vue @@ -0,0 +1,95 @@ + + diff --git a/src/views/mall/decoration/canvas/canvasPage.vue b/src/views/mall/decoration/canvas/canvasPage.vue new file mode 100644 index 0000000..1113932 --- /dev/null +++ b/src/views/mall/decoration/canvas/canvasPage.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/src/views/mall/decoration/canvas/index.vue b/src/views/mall/decoration/canvas/index.vue new file mode 100644 index 0000000..80f172d --- /dev/null +++ b/src/views/mall/decoration/canvas/index.vue @@ -0,0 +1,220 @@ + + + diff --git a/src/views/mall/member/user/UserDetail.vue b/src/views/mall/member/user/UserDetail.vue index d181474..a248732 100644 --- a/src/views/mall/member/user/UserDetail.vue +++ b/src/views/mall/member/user/UserDetail.vue @@ -1,5 +1,5 @@ - - - + + + + + + + + + + + + + + + @@ -144,4 +144,4 @@ const getList = async () => { } \ No newline at end of file + diff --git a/src/views/mall/member/user/UserTagForm.vue b/src/views/mall/member/user/UserTagForm.vue new file mode 100644 index 0000000..c63d7a7 --- /dev/null +++ b/src/views/mall/member/user/UserTagForm.vue @@ -0,0 +1,179 @@ + + + diff --git a/src/views/mall/member/user/index.vue b/src/views/mall/member/user/index.vue index 6e2bb45..b6477da 100644 --- a/src/views/mall/member/user/index.vue +++ b/src/views/mall/member/user/index.vue @@ -27,15 +27,24 @@ class="!w-240px" /> - + + + + 搜索 重置 - - 新增 - + + + - - + + + + + + + + - - + @@ -122,6 +158,7 @@ + + + + + diff --git a/src/views/mall/product/storeProduct/index.vue b/src/views/mall/product/storeProduct/index.vue index b01e140..3bff890 100644 --- a/src/views/mall/product/storeProduct/index.vue +++ b/src/views/mall/product/storeProduct/index.vue @@ -224,10 +224,11 @@ const resetQuery = () => { handleQuery() } -/** 添加/修改操作 */ +const router = useRouter(); const formRef = ref() const openForm = (type: string, id?: number) => { - formRef.value.open(type, id) + // formRef.value.open(type, id) + router.push({path:'/mall/product/form',query:{type:type,id:id}}) } /** 上下架按钮操作 */ const onSale = async (id,isShow) => { diff --git a/src/views/mall/shop/cancelAnOrder/OrderDetail.vue b/src/views/mall/shop/cancelAnOrder/OrderDetail.vue new file mode 100644 index 0000000..96765f7 --- /dev/null +++ b/src/views/mall/shop/cancelAnOrder/OrderDetail.vue @@ -0,0 +1,80 @@ + + + diff --git a/src/views/mall/shop/cancelAnOrder/index.vue b/src/views/mall/shop/cancelAnOrder/index.vue new file mode 100644 index 0000000..45c1653 --- /dev/null +++ b/src/views/mall/shop/cancelAnOrder/index.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/mall/shop/shop/ShopForm.vue b/src/views/mall/shop/shop/ShopForm.vue new file mode 100644 index 0000000..264ff85 --- /dev/null +++ b/src/views/mall/shop/shop/ShopForm.vue @@ -0,0 +1,237 @@ + + diff --git a/src/views/mall/shop/shop/index.vue b/src/views/mall/shop/shop/index.vue new file mode 100644 index 0000000..76d3a2a --- /dev/null +++ b/src/views/mall/shop/shop/index.vue @@ -0,0 +1,223 @@ + + diff --git a/src/views/mall/shopAssistant/ShopAssistantForm.vue b/src/views/mall/shopAssistant/ShopAssistantForm.vue new file mode 100644 index 0000000..d70ffb1 --- /dev/null +++ b/src/views/mall/shopAssistant/ShopAssistantForm.vue @@ -0,0 +1,184 @@ + + diff --git a/src/views/mall/shopAssistant/index.vue b/src/views/mall/shopAssistant/index.vue new file mode 100644 index 0000000..afa0634 --- /dev/null +++ b/src/views/mall/shopAssistant/index.vue @@ -0,0 +1,205 @@ + + + diff --git a/src/views/marketing/components/ActivityData.vue b/src/views/marketing/components/ActivityData.vue new file mode 100644 index 0000000..1719439 --- /dev/null +++ b/src/views/marketing/components/ActivityData.vue @@ -0,0 +1,198 @@ + + + + + diff --git a/src/views/marketing/components/SelectProduct.vue b/src/views/marketing/components/SelectProduct.vue new file mode 100644 index 0000000..5afca56 --- /dev/null +++ b/src/views/marketing/components/SelectProduct.vue @@ -0,0 +1,201 @@ + + + diff --git a/src/views/marketing/components/SetProduct.vue b/src/views/marketing/components/SetProduct.vue new file mode 100644 index 0000000..8496beb --- /dev/null +++ b/src/views/marketing/components/SetProduct.vue @@ -0,0 +1,235 @@ + + + diff --git a/src/views/marketing/discount/discountForm.vue b/src/views/marketing/discount/discountForm.vue new file mode 100644 index 0000000..7f9305a --- /dev/null +++ b/src/views/marketing/discount/discountForm.vue @@ -0,0 +1,492 @@ + + + diff --git a/src/views/marketing/discount/discountList.vue b/src/views/marketing/discount/discountList.vue new file mode 100644 index 0000000..1bc412a --- /dev/null +++ b/src/views/marketing/discount/discountList.vue @@ -0,0 +1,214 @@ + + + + + diff --git a/src/views/marketing/discount/index.vue b/src/views/marketing/discount/index.vue new file mode 100644 index 0000000..fc7ce3d --- /dev/null +++ b/src/views/marketing/discount/index.vue @@ -0,0 +1,250 @@ + + + + + diff --git a/src/views/marketing/groupBuy/groupBuyForm.vue b/src/views/marketing/groupBuy/groupBuyForm.vue new file mode 100644 index 0000000..dc2fdae --- /dev/null +++ b/src/views/marketing/groupBuy/groupBuyForm.vue @@ -0,0 +1,520 @@ + + + diff --git a/src/views/marketing/groupBuy/groupList.vue b/src/views/marketing/groupBuy/groupList.vue new file mode 100644 index 0000000..6fdc37d --- /dev/null +++ b/src/views/marketing/groupBuy/groupList.vue @@ -0,0 +1,229 @@ + + + + + diff --git a/src/views/marketing/groupBuy/index.vue b/src/views/marketing/groupBuy/index.vue new file mode 100644 index 0000000..21d9104 --- /dev/null +++ b/src/views/marketing/groupBuy/index.vue @@ -0,0 +1,232 @@ + + + + + diff --git a/src/views/marketing/seckill/index.vue b/src/views/marketing/seckill/index.vue new file mode 100644 index 0000000..2a37efc --- /dev/null +++ b/src/views/marketing/seckill/index.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/src/views/marketing/seckill/seckillForm.vue b/src/views/marketing/seckill/seckillForm.vue new file mode 100644 index 0000000..90d02a3 --- /dev/null +++ b/src/views/marketing/seckill/seckillForm.vue @@ -0,0 +1,492 @@ + + + diff --git a/src/views/marketing/seckill/seckillList.vue b/src/views/marketing/seckill/seckillList.vue new file mode 100644 index 0000000..1bc412a --- /dev/null +++ b/src/views/marketing/seckill/seckillList.vue @@ -0,0 +1,214 @@ + + + + + diff --git a/src/views/member/integralRule/IntegralRuleForm.vue b/src/views/member/integralRule/IntegralRuleForm.vue new file mode 100644 index 0000000..4f5b3e7 --- /dev/null +++ b/src/views/member/integralRule/IntegralRuleForm.vue @@ -0,0 +1,238 @@ + + + + diff --git a/src/views/member/integralRule/index.vue b/src/views/member/integralRule/index.vue new file mode 100644 index 0000000..ad5ee0f --- /dev/null +++ b/src/views/member/integralRule/index.vue @@ -0,0 +1,127 @@ + + + diff --git a/src/views/member/signInRecord/SignInRecordForm.vue b/src/views/member/signInRecord/SignInRecordForm.vue new file mode 100644 index 0000000..031b80a --- /dev/null +++ b/src/views/member/signInRecord/SignInRecordForm.vue @@ -0,0 +1,95 @@ + + diff --git a/src/views/member/signInRecord/index.vue b/src/views/member/signInRecord/index.vue new file mode 100644 index 0000000..1816916 --- /dev/null +++ b/src/views/member/signInRecord/index.vue @@ -0,0 +1,193 @@ + + + diff --git a/src/views/member/userInviteLog/UserInviteLogForm.vue b/src/views/member/userInviteLog/UserInviteLogForm.vue new file mode 100644 index 0000000..ba07c1e --- /dev/null +++ b/src/views/member/userInviteLog/UserInviteLogForm.vue @@ -0,0 +1,97 @@ + + diff --git a/src/views/member/userInviteLog/index.vue b/src/views/member/userInviteLog/index.vue new file mode 100644 index 0000000..1b04903 --- /dev/null +++ b/src/views/member/userInviteLog/index.vue @@ -0,0 +1,193 @@ + + + diff --git a/src/views/member/userLevelConfig/UserLevelConfigForm.vue b/src/views/member/userLevelConfig/UserLevelConfigForm.vue new file mode 100644 index 0000000..5501d37 --- /dev/null +++ b/src/views/member/userLevelConfig/UserLevelConfigForm.vue @@ -0,0 +1,427 @@ + + + diff --git a/src/views/member/userLevelConfig/index.vue b/src/views/member/userLevelConfig/index.vue new file mode 100644 index 0000000..284eaaf --- /dev/null +++ b/src/views/member/userLevelConfig/index.vue @@ -0,0 +1,155 @@ + + + diff --git a/src/views/member/userLevelEquity/UserLevelEquityForm.vue b/src/views/member/userLevelEquity/UserLevelEquityForm.vue new file mode 100644 index 0000000..1e9571e --- /dev/null +++ b/src/views/member/userLevelEquity/UserLevelEquityForm.vue @@ -0,0 +1,106 @@ + + diff --git a/src/views/member/userLevelEquity/index.vue b/src/views/member/userLevelEquity/index.vue new file mode 100644 index 0000000..84a85fc --- /dev/null +++ b/src/views/member/userLevelEquity/index.vue @@ -0,0 +1,144 @@ + + + diff --git a/src/views/member/userLevelEquityRef/UserLevelEquityRefForm.vue b/src/views/member/userLevelEquityRef/UserLevelEquityRefForm.vue new file mode 100644 index 0000000..0e2191a --- /dev/null +++ b/src/views/member/userLevelEquityRef/UserLevelEquityRefForm.vue @@ -0,0 +1,97 @@ + + diff --git a/src/views/member/userLevelEquityRef/index.vue b/src/views/member/userLevelEquityRef/index.vue new file mode 100644 index 0000000..15d85d1 --- /dev/null +++ b/src/views/member/userLevelEquityRef/index.vue @@ -0,0 +1,193 @@ + + + diff --git a/src/views/member/userLevelGrowthValueConfig/UserLevelGrowthValueConfigForm.vue b/src/views/member/userLevelGrowthValueConfig/UserLevelGrowthValueConfigForm.vue new file mode 100644 index 0000000..95eea5d --- /dev/null +++ b/src/views/member/userLevelGrowthValueConfig/UserLevelGrowthValueConfigForm.vue @@ -0,0 +1,121 @@ + + diff --git a/src/views/member/userLevelGrowthValueConfig/index.vue b/src/views/member/userLevelGrowthValueConfig/index.vue new file mode 100644 index 0000000..68949e1 --- /dev/null +++ b/src/views/member/userLevelGrowthValueConfig/index.vue @@ -0,0 +1,214 @@ + + + diff --git a/src/views/member/userTag/UserTagForm.vue b/src/views/member/userTag/UserTagForm.vue new file mode 100644 index 0000000..21a807a --- /dev/null +++ b/src/views/member/userTag/UserTagForm.vue @@ -0,0 +1,118 @@ + + diff --git a/src/views/member/userTag/components/TagGroup.vue b/src/views/member/userTag/components/TagGroup.vue new file mode 100644 index 0000000..59ffb0d --- /dev/null +++ b/src/views/member/userTag/components/TagGroup.vue @@ -0,0 +1,121 @@ + + + + + diff --git a/src/views/member/userTag/components/UserGroupForm.vue b/src/views/member/userTag/components/UserGroupForm.vue new file mode 100644 index 0000000..b2db251 --- /dev/null +++ b/src/views/member/userTag/components/UserGroupForm.vue @@ -0,0 +1,95 @@ + + diff --git a/src/views/member/userTag/index.vue b/src/views/member/userTag/index.vue new file mode 100644 index 0000000..59856a7 --- /dev/null +++ b/src/views/member/userTag/index.vue @@ -0,0 +1,180 @@ + + + diff --git a/src/views/member/userTagGroup/UserTagGroupForm.vue b/src/views/member/userTagGroup/UserTagGroupForm.vue new file mode 100644 index 0000000..9dd9799 --- /dev/null +++ b/src/views/member/userTagGroup/UserTagGroupForm.vue @@ -0,0 +1,95 @@ + + diff --git a/src/views/member/userTagGroup/index.vue b/src/views/member/userTagGroup/index.vue new file mode 100644 index 0000000..bb7fae5 --- /dev/null +++ b/src/views/member/userTagGroup/index.vue @@ -0,0 +1,194 @@ + + + diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..d6d39d4 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,14 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: [ + "./src/**/*.{js,jsx,ts,tsx}", + ], + theme: { + extend: {}, + }, + plugins: [], + corePlugins: { + preflight: false, //禁止tailwindcss的默认属性 + } +} + diff --git a/types/components.d.ts b/types/components.d.ts index 9d0ba09..c333cb7 100644 --- a/types/components.d.ts +++ b/types/components.d.ts @@ -1,8 +1,10 @@ -declare module 'vue' { +declare module '*.vue' { + import {defineComponent} from 'vue' export interface GlobalComponents { Icon: typeof import('@/components/Icon')['Icon'] DictTag: typeof import('@/components/DictTag')['DictTag'] } + export default defineComponent } export {} diff --git a/types/global.d.ts b/types/global.d.ts index 5e29268..7f21311 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -1,5 +1,9 @@ export {} declare global { + interface Window { + _AMapSecurityConfig: any + } + interface Fn { (...arg: T[]): T } @@ -37,6 +41,11 @@ declare global { data: T extends any ? T : T & any } + interface PageVO{ + list: T[] + total: number + } + interface PageParam { pageSize?: number pageNo?: number