From 0a6abd87ae9cc3cb56950d6044c0303239c8d51a Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Wed, 22 Jul 2026 16:48:46 +0800 Subject: [PATCH 1/8] =?UTF-8?q?build(mp-harmony):=20=E6=B7=BB=E5=8A=A0comp?= =?UTF-8?q?onents=5Fdiy=E5=92=8C=E9=A1=B5=E9=9D=A2=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E7=9A=84=E6=9E=84=E5=BB=BA=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 同时新增清理华为IDE内置node路径的脚本,以及空的权限检查文件 --- .local.config.js | 9 ++- .trae_permission_check_15252 | 0 .trae_permission_check_15564 | 0 .trae_permission_check_6200 | 0 remove-huawei-node-from-path.ps1 | 62 +++++++++++++++++++ .../mp-harmony/build-profile.json5 | 60 ++++++++++++++++++ 6 files changed, 129 insertions(+), 2 deletions(-) create mode 100644 .trae_permission_check_15252 create mode 100644 .trae_permission_check_15564 create mode 100644 .trae_permission_check_6200 create mode 100644 remove-huawei-node-from-path.ps1 diff --git a/.local.config.js b/.local.config.js index 1cf99cf..fb359fe 100644 --- a/.local.config.js +++ b/.local.config.js @@ -83,6 +83,10 @@ const localDevConfig = ({ uniacid: 206, domain: 'https://5g.aigc-quickapp.com/', }, + '5g-165': { // 鸡肉调理品, 优惠卷显示不全,及逻辑错误 + uniacid: 165, + domain: 'https://5g.aigc-quickapp.com/', + }, '47': { // 修改弹窗 uniacid: 47, domain: 'https://5g.aigc-quickapp.com/', @@ -143,11 +147,12 @@ const localDevConfig = ({ // })['5g-97']; // 大宗商品贸易,支持自定义字体大小、颜色 // })['5g-50']; // 燃气安全产品机器人,购物车无反应 // })['2821']; // 离型纸硅油纸 -})['2482']; // 低空经济 +// })['2482']; // 低空经济 // })['48']; // 离型纸硅油纸 // })['2485']; // 验证电子表单前后端数据一致性 // })['5g-11']; // 数码 -// })['5g-213']; // 选择要使用的环境配置 +// })['5g-213']; // 选择要使用的环境配置 +})['5g-165']; // 鸡肉调理品, 优惠卷显示不全,及逻辑错误 // })['2811']; // 选择要使用的环境配置 // })['local-11']; // 选择要使用的环境配置 // })['local-1']; // 本地 diff --git a/.trae_permission_check_15252 b/.trae_permission_check_15252 new file mode 100644 index 0000000..e69de29 diff --git a/.trae_permission_check_15564 b/.trae_permission_check_15564 new file mode 100644 index 0000000..e69de29 diff --git a/.trae_permission_check_6200 b/.trae_permission_check_6200 new file mode 100644 index 0000000..e69de29 diff --git a/remove-huawei-node-from-path.ps1 b/remove-huawei-node-from-path.ps1 new file mode 100644 index 0000000..2c814cc --- /dev/null +++ b/remove-huawei-node-from-path.ps1 @@ -0,0 +1,62 @@ +$ErrorActionPreference = 'Stop' + +$target = 'C:\Program Files\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\lib\toolkit\nodeTool' + +$before = [Environment]::GetEnvironmentVariable('Path', 'Machine') + +Write-Host '=== Before: target entries in Machine PATH ===' +$before -split ';' | ForEach-Object { + if ($_.Trim() -ieq $target) { + Write-Host (" [" + $_ + "]") + } +} + +$entries = $before -split ';' +$kept = New-Object System.Collections.Generic.List[string] +$removed = New-Object System.Collections.Generic.List[string] +foreach ($e in $entries) { + $t = $e.Trim() + if ($t -ieq $target) { + $removed.Add($e) + } elseif ($t -ne '') { + $kept.Add($e) + } +} +$after = [string]::Join(';', $kept.ToArray()) + +if ($removed.Count -eq 0) { + Write-Host 'Target entry not found, nothing to do.' + exit 0 +} + +try { + [Environment]::SetEnvironmentVariable('Path', $after, 'Machine') + Write-Host '' + Write-Host '=== Result ===' + Write-Host (" Removed entries: " + $removed.Count) + foreach ($r in $removed) { Write-Host (" - " + $r) } + Write-Host (" Remaining entries: " + $kept.Count) + Write-Host ' Write OK.' +} catch { + Write-Host '' + Write-Host (' Write FAILED (admin required?): ' + $_.Exception.Message) + exit 1 +} + +Write-Host '' +Write-Host '=== Verify after write ===' +$verify = [Environment]::GetEnvironmentVariable('Path', 'Machine') +$stillThere = 0 +foreach ($e in ($verify -split ';')) { + if ($e.Trim() -ieq $target) { $stillThere++ } +} +if ($stillThere -gt 0) { + Write-Host ' FAIL: target still present.' + exit 1 +} else { + Write-Host ' OK: target no longer in Machine PATH.' +} + +Write-Host '' +Write-Host 'Note: env var change does NOT affect already-running processes.' +Write-Host 'Reopen cmd / Git Bash / HBuilderX to see updated where node.' \ No newline at end of file diff --git a/stub-app-projects/mp-harmony/build-profile.json5 b/stub-app-projects/mp-harmony/build-profile.json5 index 3d89ede..3ffaf31 100644 --- a/stub-app-projects/mp-harmony/build-profile.json5 +++ b/stub-app-projects/mp-harmony/build-profile.json5 @@ -64,6 +64,66 @@ ] } ] + }, + { + "name": "components_diy", + "srcPath": "./ascf/ascf_build/components_diy", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + }, + { + "name": "pages_goods", + "srcPath": "./ascf/ascf_build/pages_goods", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + }, + { + "name": "pages_order", + "srcPath": "./ascf/ascf_build/pages_order", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + }, + { + "name": "pages_promotion", + "srcPath": "./ascf/ascf_build/pages_promotion", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + }, + { + "name": "pages_tool", + "srcPath": "./ascf/ascf_build/pages_tool", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] } ] } \ No newline at end of file From 6ee4de94a2492900447efc50430ac21ed8cab799 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Thu, 23 Jul 2026 08:45:01 +0800 Subject: [PATCH 2/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=9A=E5=95=86?= =?UTF-8?q?=E6=88=B7=E4=BC=98=E6=83=A0=E5=88=B8=E9=80=89=E6=8B=A9=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E5=92=8C=E7=A9=BA=E6=8C=87=E9=92=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 新增coupon_list数组类型校验避免渲染异常 2. 重构优惠券选择逻辑,使用merch_id隔离选中状态避免多商户污染 3. 增加orderCreateData.coupon的类型兜底处理,防止非对象/数组类型报错 4. 修复优惠券弹窗选中状态同步逻辑,保留用户已选优惠券 --- pages_goods/public/js/detail.js | 2 +- .../common-payment/common-payment.vue | 4 +- .../_components/common-payment/payment.js | 111 +++++++++++------- 3 files changed, 70 insertions(+), 47 deletions(-) diff --git a/pages_goods/public/js/detail.js b/pages_goods/public/js/detail.js index 30618aa..2f7ad34 100644 --- a/pages_goods/public/js/detail.js +++ b/pages_goods/public/js/detail.js @@ -249,7 +249,7 @@ export default { } // 优惠券 - if (this.goodsSkuDetail.coupon_list) { + if (Array.isArray(this.goodsSkuDetail.coupon_list)) { this.couponList = this.goodsSkuDetail.coupon_list; this.couponList.forEach(v => { if (v.count == v.lead_count) v.useState = 2; diff --git a/pages_order/_components/common-payment/common-payment.vue b/pages_order/_components/common-payment/common-payment.vue index 62fba90..fa13a7f 100644 --- a/pages_order/_components/common-payment/common-payment.vue +++ b/pages_order/_components/common-payment/common-payment.vue @@ -234,7 +234,7 @@ {{ $lang('order.payment.orderMoney.coupon') }} - @@ -170,12 +208,16 @@ export default { isSend: false }, // 小程序获取手机号所需数据 - authMobileData: { - iv: '', - encryptedData: '' - }, - site_name: '' - }; + authMobileData: { + iv: '', + encryptedData: '' + }, + site_name: '', + // #ifdef MP-HARMONY + // 鸿蒙专属:控制手机号+验证码表单显示 + showHarmonyMobileForm: false, + // #endif + }; }, options: { styleIsolation: 'shared' @@ -203,7 +245,7 @@ export default { if (this.forceBindingMobileControl) { if (this.formData.mobile.length == 0) return true; - // #ifdef H5 + // #ifdef H5 || MP-HARMONY // 验证码 if (this.isOpenCaptcha == 1 && this.formData.vercode.length == 0) return true; // 动态码 @@ -343,7 +385,7 @@ export default { openCompleteInfoPop() { this.getRegisterConfig(); - // #ifdef H5 + // #ifdef H5 || MP-HARMONY if (!this.storeToken) this.getCaptchaConfig(); // #endif @@ -676,6 +718,26 @@ export default { this.forceBindMobile(); }, + // #ifdef MP-HARMONY + // 鸿蒙元服务保存手机号:复用 H5 的强制绑定手机号流程 + harmonySaveMobile() { + if (this.forceBindingMobileControl) { + let data = { + mobile: this.formData.mobile, + key: this.formData.key, + code: this.formData.dynacode + }; + if (this.captcha.id != '') { + data.captcha_id = this.captcha.id; + data.captcha_code = this.formData.vercode; + } + if (!this.verify(data)) return; + } + // 鸿蒙环境下通常也开启了 forceBindingMobileControl(走 forceBindMobile 接口) + this.forceBindMobile(); + }, + // #endif + // 微信小程序保存数据 saveMp() { if (this.formData.mobile === '') { diff --git a/components/ns-navbar/ns-navbar.vue b/components/ns-navbar/ns-navbar.vue index a2b4c5e..2c52cfa 100644 --- a/components/ns-navbar/ns-navbar.vue +++ b/components/ns-navbar/ns-navbar.vue @@ -53,7 +53,7 @@ let systemInfo = uni.getSystemInfoSync(); let menuButtonInfo = {}; // 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容) -// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ +// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ || MP-HARMONY menuButtonInfo = uni.getMenuButtonBoundingClientRect(); // #endif diff --git a/components/ns-payment/ns-payment.vue b/components/ns-payment/ns-payment.vue index c5f99a5..db619bf 100644 --- a/components/ns-payment/ns-payment.vue +++ b/components/ns-payment/ns-payment.vue @@ -98,6 +98,13 @@ export default { { name: this.$lang('components.nsPayment.alipay'), icon: 'icon-zhifubaozhifu-', type: 'alipay', provider: 'alipay' }, ]; // #endif + // #ifdef MP-HARMONY + // 鸿蒙元服务的支付通道: 与微信小程序相同的 provider='wxpay', + // 但走鸿蒙 JSSDK 的 requestPayment(走鸿蒙支付服务而非 wx.requestPayment) + this.payTypeList = [ + { name: this.$lang('components.nsPayment.wechatpay'), provider: 'wxpay', icon: 'icon-weixin1', type: 'wechatpay' }, + ]; + // #endif let url; // #ifdef H5 diff --git a/components/payment/payment.vue b/components/payment/payment.vue index ee7874a..e756c22 100644 --- a/components/payment/payment.vue +++ b/components/payment/payment.vue @@ -95,6 +95,16 @@ i18nKey: 'components.payment.alipay' }], // #endif + // #ifdef MP-HARMONY + // 鸿蒙元服务的支付通道: provider='wxpay' 由鸿蒙 JSSDK 接管 + payTypeList: [{ + name: '微信支付', + provider: 'wxpay', + icon: 'icon-weixin1', + type: 'wechatpay', + i18nKey: 'components.payment.wechatpay' + }], + // #endif payInfo: null, balanceConfig: 0, // 预售页面判断 diff --git a/pages_goods/_components/goods-detail-view/goods-detail-view.vue b/pages_goods/_components/goods-detail-view/goods-detail-view.vue index b9ebd6f..edfd882 100644 --- a/pages_goods/_components/goods-detail-view/goods-detail-view.vue +++ b/pages_goods/_components/goods-detail-view/goods-detail-view.vue @@ -461,7 +461,7 @@ {{ $lang('goods.detail.detailView.generateSharePoster') }} - +