From 1246d2d218cb2c7d15be69c3ea7fdee6d738475a Mon Sep 17 00:00:00 2001 From: lukaijie Date: Fri, 3 Jul 2026 14:32:48 +0800 Subject: [PATCH] [TBID:ECX-9138] chore: merge master changes for release --- .gitignore | 2 + .husky/commit-msg | 2 +- README.md | 19 ++ commitlint.config.js | 12 +- src/api/common.js | 17 +- src/components/function/distributorSelect.vue | 20 +- src/components/related-upload/index.vue | 13 +- src/components/sp-path-selector/config.js | 2 +- .../GoodsPicker.country-code.test.mjs | 10 + src/components/sp-picker-plus/GoodsPicker.vue | 2 + .../sp-picker/pickers/picker-wxapp.vue | 2 +- src/consts/index.js | 3 +- src/i18n/locales/ar.json | 35 ++- src/i18n/locales/en.json | 35 ++- src/i18n/locales/zh-CN.json | 43 ++- src/router/routes/modules/setting.js | 11 + src/router/src/route-setting.js | 2 +- src/utils/src/utils.js | 23 ++ src/view/base/currency/index.vue | 192 +++++++------ src/view/base/screen/openScreenAD.vue | 1 - src/view/content/consts.js | 0 src/view/content/soft-article-id.vue | 24 +- src/view/content/soft-article.vue | 2 + src/view/dealer/bspay_create_user.vue | 33 ++- src/view/decorate/wgts/wgt_shop/index.vue | 5 +- src/view/mall/aftersales/refundDetail.vue | 22 +- .../refundList/components/order.vue | 18 +- src/view/mall/goods/physical/list.vue | 264 +++++++++++++----- .../mall/goods/physical/normalGoodsUpload.vue | 8 +- src/view/mall/marketing/distributor.vue | 36 ++- .../mall/storeshop/store-shop.standard.vue | 38 ++- src/view/mall/trade/list.vue | 36 ++- src/view/mall/trade/normalorders/list.vue | 11 +- .../trade/order/detail/component/PayCard.vue | 13 +- src/view/mall/trade/order/detail/index.vue | 77 ++--- src/view/marketing/employee/addGoods.vue | 31 +- src/view/marketing/employee/purchase.vue | 4 +- src/view/member/level.vue | 9 +- src/view/member/point/index.vue | 15 +- src/view/merchant/store.vue | 31 +- .../application-center/shopex-appcenter.vue | 19 +- src/views/applications/shuyun/crm-setting.vue | 4 +- .../systemConfig/extMiniLinkDetail.vue | 1 - src/views/settings/systemConfig/payment.vue | 162 ++++++++++- .../systemConfig/wxapp-customer-service.vue | 76 +---- 45 files changed, 915 insertions(+), 470 deletions(-) create mode 100644 src/components/sp-picker-plus/GoodsPicker.country-code.test.mjs mode change 100755 => 100644 src/view/content/consts.js diff --git a/.gitignore b/.gitignore index f225c57..ca3b065 100755 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,6 @@ openspec/ dist/ .cursor/commit-summary/ .codegraph/ +.cursor/skills/ +.understand-anything \ No newline at end of file diff --git a/.husky/commit-msg b/.husky/commit-msg index fe4c17a..0bd658f 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npx --no-install commitlint --edit "" +npx --no-install commitlint --edit "$1" diff --git a/README.md b/README.md index c899ec9..b0364e4 100755 --- a/README.md +++ b/README.md @@ -44,6 +44,25 @@ VUE_APP_LOCAL_DELIVERY_DIRVER= VUE_APP_DEFAULT_LANG=en ``` +### Cloud Deployment: Backend API Base URL + +When deploying to a server or cloud host, login fails until `VUE_APP_BASE_API` points at your **own** backend instead of the default. + +- **Which variable / file?** Set `VUE_APP_BASE_API` in `.env`, or in `.env.local` which overrides `.env` and is git-ignored (recommended for per-deployment values). If it is left empty the app falls back to `/`, so API calls hit the frontend host itself and login fails. +- **Do I need the port?** Only when the backend is reached directly on a non-standard port — the PHP API listens on `8005` by default. Behind a domain proxied by Nginx on 80/443, omit the port. +- **Rebuild after every change.** `VUE_APP_*` variables are baked into the static bundle at build time. After editing the env file you must re-run the build for the new address to take effect. Run the build from the project root (where `package.json` lives); inside a container, run it in that same directory. + +```shell +# Behind a domain (Nginx on 80/443) — no port needed, end with /api +VUE_APP_BASE_API=https://your-domain.com/api +# Direct public IP on a non-standard port — include the port +VUE_APP_BASE_API=http://1.2.3.4:8005/api + +# Rebuild after changing the value +npm run build:b2c # B2C +npm run build:bbc # B2B2C +``` + ### Installation ``` cd ECShopX_admin-frontend diff --git a/commitlint.config.js b/commitlint.config.js index d256183..966ead2 100755 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,11 +1,19 @@ module.exports = { extends: ['@commitlint/config-conventional', 'cz'], + // 支持 GitLab 强制要求的 [TBID:ECX-xxxx] 前缀,后跟 type(scope)?: subject + parserPreset: { + parserOpts: { + headerPattern: /^\[TBID:[A-Za-z0-9]+-\d+\]\s+(\w+)(?:\(([^)]+)\))?\s*:?\s+(.+)$/, + headerCorrespondence: ['type', 'scope', 'subject'] + } + }, rules: { 'type-enum': [ 2, 'always', [ 'feature', // 新功能(feature) + 'feat', // 新功能(简写,与历史提交兼容) 'bug', // 此项特别针对bug号,用于向测试反馈bug列表的bug修改情况 'fix', // 修补bug 'ui', // 更新 ui @@ -26,8 +34,8 @@ module.exports = { 'type-case': [2, 'always', 'lower-case'], // 不能为空 'type-empty': [2, 'never'], - // 范围不能为空 - 'scope-empty': [2, 'never'], + // 可选(团队惯例多为 [TBID:xxx] type: subject,不写 scope) + 'scope-empty': [0], // 范围格式 'scope-case': [0], // 主要 message 不能为空 diff --git a/src/api/common.js b/src/api/common.js index 53b9ca9..66a3499 100755 --- a/src/api/common.js +++ b/src/api/common.js @@ -65,11 +65,22 @@ export function getFileBlob(url) { responseType: 'arraybuffer', headers: { Authorization: 'bearer ' + store.getters.token } }) - .then((data) => { - resolve(data.data) + .then((response) => { + const contentType = response.headers['content-type'] || '' + if (contentType.includes('application/json') || contentType.includes('text/')) { + try { + const text = new TextDecoder().decode(response.data) + const err = JSON.parse(text) + reject(err.message || err.msg || text) + } catch { + reject('文件下载失败') + } + return + } + resolve(response.data) }) .catch((error) => { - reject(error.toString()) + reject(typeof error === 'string' ? error : error.toString()) }) }) } diff --git a/src/components/function/distributorSelect.vue b/src/components/function/distributorSelect.vue index e371e73..c15ac83 100755 --- a/src/components/function/distributorSelect.vue +++ b/src/components/function/distributorSelect.vue @@ -12,14 +12,20 @@ :before-close="cancelAction" > -
+
- - + @keyup.enter.native="handleIconClick" + /> + +
+