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] =?UTF-8?q?build(mp-harmony):=20=E6=B7=BB=E5=8A=A0componen?= =?UTF-8?q?ts=5Fdiy=E5=92=8C=E9=A1=B5=E9=9D=A2=E6=A8=A1=E5=9D=97=E7=9A=84?= =?UTF-8?q?=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