From 896acaef9ed6a40b8813a2b7f4a47b1263789603 Mon Sep 17 00:00:00 2001 From: YuanHuakk <1751826683@qq.com> Date: Thu, 29 May 2025 15:45:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(custom):=20=E5=9C=B0=E5=9B=BEapiKey?= =?UTF-8?q?=E6=9B=B4=E6=8D=A2=EF=BC=8C=E8=AE=A2=E5=8D=95=E6=A0=B8=E9=94=80?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=96=B0=E5=A2=9E=E6=94=AF=E4=BB=98=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cz-config.js | 20 +- .prettierrc.json | 5 +- config/index.ts | 18 +- package.json | 7 +- pnpm-workspace.yaml | 11 ++ src/app.ts | 2 +- src/components/Auth.vue | 6 +- src/components/Back.vue | 6 +- src/components/Cart.vue | 12 +- src/components/MerList.vue | 14 +- src/components/Pay.vue | 16 +- src/components/Popup.vue | 2 +- src/components/RichEditor.vue | 16 +- src/components/StoreList.vue | 4 +- src/components/Upload.vue | 4 +- src/components/UserModal.vue | 12 +- src/pages/admin/add_order/add_menu/index.vue | 6 +- src/pages/admin/add_order/add_table/index.vue | 8 +- src/pages/admin/add_order/index.scss | 3 +- .../pending_order/components/Footer.vue | 8 +- .../admin/add_order/pending_order/index.vue | 6 +- .../add_order/pending_order/pay/index.vue | 8 +- .../pending_order_detail/index.vue | 4 +- .../pending_order/wx_pay_code/index.vue | 6 +- src/pages/admin/order_manage/detail/index.vue | 10 +- src/pages/admin/order_manage/index.vue | 6 +- src/pages/admin/order_manage/list/index.vue | 20 +- src/pages/admin/statistics/index.vue | 4 +- src/pages/admin/verify/index.vue | 22 +-- src/pages/admin/verify/verify_list/index.vue | 6 +- src/pages/admin/withdrawal/index.vue | 14 +- src/pages/allClassList/index.vue | 4 +- src/pages/cart/index.vue | 8 +- src/pages/category/index.vue | 4 +- src/pages/fastBuy/index.vue | 8 +- src/pages/game/gamedetail/index.vue | 2 +- src/pages/game/gamehome/index.vue | 8 +- src/pages/game/view/index.vue | 6 +- src/pages/goods/goods_detail/index.vue | 16 +- src/pages/goods/order_create/index.vue | 6 +- src/pages/goods/order_status/index.vue | 2 +- src/pages/goods/pay/index.vue | 16 +- src/pages/hotGoods/hot_list/index.vue | 18 +- src/pages/hotGoods/index/index.vue | 6 +- src/pages/index/index.vue | 20 +- src/pages/marketing/scratch/index.vue | 8 +- src/pages/marketing/yq/index.vue | 10 +- src/pages/mer/mer_detail/index.vue | 10 +- src/pages/product/addGoods/index.vue | 6 +- src/pages/product/list/index.vue | 8 +- src/pages/search/index.vue | 2 +- src/pages/user/index.vue | 10 +- src/pages/users/account/index.vue | 6 +- src/pages/users/bindPhone/index.vue | 4 +- src/pages/users/distribution/index.vue | 8 +- .../users/distribution/integral/index.vue | 8 +- .../users/distribution/userlist/index.vue | 10 +- src/pages/users/login/index.vue | 6 +- src/pages/users/order_list/index.vue | 28 +-- src/pages/users/order_list_detail/index.vue | 16 +- src/pages/users/pending_order/index.vue | 6 +- .../pending_order_detail/index.vue | 4 +- src/pages/users/pwd/index.vue | 16 +- src/pages/users/setting/index.vue | 2 +- src/pages/users/settled_mer/index.vue | 8 +- src/pages/users/user_agreement/index.vue | 4 +- src/pages/users/user_setting/index.vue | 8 +- src/utils/game_request.ts | 2 +- src/utils/js_sdk/u-charts.min.js | 182 +++++++++--------- src/utils/request.ts | 2 +- 70 files changed, 408 insertions(+), 376 deletions(-) create mode 100644 pnpm-workspace.yaml diff --git a/.cz-config.js b/.cz-config.js index 067f965..18150c7 100644 --- a/.cz-config.js +++ b/.cz-config.js @@ -1,8 +1,8 @@ module.exports = { types: [ - {value: 'feat', name: 'feat: 新增功能'}, - {value: 'fix', name: 'fix: 修复bug'}, - {value: 'docs', name: 'docs: 文档变更'}, + { value: 'feat', name: 'feat: 新增功能' }, + { value: 'fix', name: 'fix: 修复bug' }, + { value: 'docs', name: 'docs: 文档变更' }, { value: 'style', name: 'style: 代码格式(不影响功能,例如空格、分号等格式修正)', @@ -11,21 +11,21 @@ module.exports = { value: 'refactor', name: 'refactor: 代码重构(不包括 bug 修复、功能新增)', }, - {value: 'perf', name: 'perf: 性能优化'}, - {value: 'test', name: 'test: 添加、修改测试用例'}, + { value: 'perf', name: 'perf: 性能优化' }, + { value: 'test', name: 'test: 添加、修改测试用例' }, { value: 'build', name: 'build: 构建流程、外部依赖变更(如升级 npm 包、修改 脚手架 配置等)', }, - {value: 'ci', name: 'ci: 修改 CI 配置、脚本'}, + { value: 'ci', name: 'ci: 修改 CI 配置、脚本' }, { value: 'chore', name: 'chore: 对构建过程或辅助工具和库的更改(不影响源文件、测试用例)', }, - {value: 'revert', name: 'revert: 回滚 commit'}, - {value: 'wip', name: 'wip: 开发中'}, - {value: 'mod', name: 'mod: 不确定分类的修改'}, - {value: 'release', name: 'release: 发布'}, + { value: 'revert', name: 'revert: 回滚 commit' }, + { value: 'wip', name: 'wip: 开发中' }, + { value: 'mod', name: 'mod: 不确定分类的修改' }, + { value: 'release', name: 'release: 发布' }, ], scopes: [ ['custom', '自定义'], diff --git a/.prettierrc.json b/.prettierrc.json index fe440a6..70410d1 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,7 +1,8 @@ { "arrowParens": "avoid", "bracketSameLine": true, - "bracketSpacing": false, + "bracketSpacing": true, "singleQuote": true, - "trailingComma": "all" + "trailingComma": "all", + "endOfLine": "lf" } diff --git a/config/index.ts b/config/index.ts index d4843be..5a399a0 100644 --- a/config/index.ts +++ b/config/index.ts @@ -1,10 +1,10 @@ import Components from 'unplugin-vue-components/webpack'; import NutUIResolver from '@nutui/nutui-taro/dist/resolver'; -import {UnifiedWebpackPluginV5} from 'weapp-tailwindcss/webpack'; -import {join} from 'node:path'; -import {argv} from 'yargs'; +import { UnifiedWebpackPluginV5 } from 'weapp-tailwindcss/webpack'; +import { join } from 'node:path'; +import { argv } from 'yargs'; -const {robot = 1, desc} = argv; +const { robot = 1, desc } = argv; const CIPluginOptFn = async () => { /** @@ -25,7 +25,7 @@ const CIPluginOptFn = async () => { const config = { projectName: 'taroApp', date: '2023-8-13', - designWidth(input: {file: string}) { + designWidth(input: { file: string }) { if (input?.file?.replace(/\\+/g, '/').indexOf('@nutui') > -1) { return 375; } @@ -48,10 +48,10 @@ const config = { framework: 'vue3', compiler: { type: 'webpack5', - prebundle: {enable: false}, + prebundle: { enable: false }, }, cache: { - enable: false, // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache + enable: true, // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache }, sass: { data: `@import "@nutui/nutui-taro/dist/styles/variables.scss";`, @@ -75,7 +75,7 @@ const config = { }); chain.plugin('unplugin-vue-components').use( Components({ - resolvers: [NutUIResolver({taro: true})], + resolvers: [NutUIResolver({ taro: true })], }), ); }, @@ -110,7 +110,7 @@ const config = { webpackChain(chain) { chain.plugin('unplugin-vue-components').use( Components({ - resolvers: [NutUIResolver({taro: true})], + resolvers: [NutUIResolver({ taro: true })], }), ); }, diff --git a/package.json b/package.json index c92aa86..51521dd 100644 --- a/package.json +++ b/package.json @@ -36,9 +36,8 @@ "lint:fix": "eslint --fix --ext .ts,.vue .", "lint:staged": "lint-staged", "prepare": "husky install", - "preview": "vite preview", "cz": "cz", - "lf": "npx prettier --write --end-of-line lf .", + "lf": "npx prettier --write", "postinstall": "weapp-tw patch", "build:weapp:prod:upload": "taro build --type weapp --upload --robot=1 --desc='正式环境'", "build:weapp:test:upload": "taro build --type weapp --upload --robot=2 --desc='测试环境' --mode test" @@ -112,6 +111,7 @@ "miniprogram-ci": "^2.0.10", "postcss": "8.4.29", "postcss-rem-to-responsive-pixel": "^6.0.2", + "prettier": "^3.5.3", "style-loader": "1.3.0", "stylelint": "9.3.0", "tailwindcss": "^3.4.17", @@ -122,6 +122,5 @@ "weapp-tailwindcss": "^3.7.0", "webpack": "^5.97.1", "yargs": "^17.7.2" - }, - "packageManager": "pnpm@9.1.4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0" + } } diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..a586cd8 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,11 @@ +onlyBuiltDependencies: + - '@parcel/watcher' + - '@swc/core' + - '@tarojs/binding' + - core-js + - core-js-pure + - esbuild + - protobufjs + - swiper + - vue-demi + - weapp-tailwindcss diff --git a/src/app.ts b/src/app.ts index ed366b6..b41722e 100644 --- a/src/app.ts +++ b/src/app.ts @@ -1,4 +1,4 @@ -import {createApp} from 'vue'; +import { createApp } from 'vue'; import Taro from '@tarojs/taro'; import './app.scss'; diff --git a/src/components/Auth.vue b/src/components/Auth.vue index dd12ac6..758dd78 100644 --- a/src/components/Auth.vue +++ b/src/components/Auth.vue @@ -16,7 +16,7 @@ diff --git a/src/pages/users/distribution/userlist/index.vue b/src/pages/users/distribution/userlist/index.vue index 04d1cc0..8daf3cd 100644 --- a/src/pages/users/distribution/userlist/index.vue +++ b/src/pages/users/distribution/userlist/index.vue @@ -27,9 +27,9 @@ diff --git a/src/pages/users/login/index.vue b/src/pages/users/login/index.vue index 148ff7d..3577eec 100644 --- a/src/pages/users/login/index.vue +++ b/src/pages/users/login/index.vue @@ -1,8 +1,8 @@