diff --git a/scripts/dev-adb.cjs b/scripts/dev-adb.cjs index 5b3703a..25f3291 100644 --- a/scripts/dev-adb.cjs +++ b/scripts/dev-adb.cjs @@ -312,7 +312,18 @@ async function buildAndInstall(device, trigger) { } // 3. 离线打包(-Dev:产物进 release/android/dev 且带 _dev 后缀,不触发发布上传) - if (!run('npm', ['run', 'android:pack:raw', '--', '-Dev', '-NoUpload'])) { + // 注意:不要用 `npm run android:pack:raw -- -Dev -NoUpload`。 + // PowerShell 会把 `--` 吞掉,`-Dev/-NoUpload` 随即被 npm 当作未知选项丢弃, + // 结果是打出「发行包」(覆盖 release/android/ 下的正式 APK),而 dev 目录没有新文件, + // 后面 findDevApk() 就会装回旧包,真机上看到的永远是老界面。 + // 这里直接调 pack.ps1,参数一定生效。 + if (!run('powershell', [ + '-NoProfile', + '-ExecutionPolicy', 'Bypass', + '-File', path.join(ROOT, 'android-offline', 'pack.ps1'), + '-Dev', + '-NoUpload', + ])) { log('✗ 打包失败,跳过安装') return false } diff --git a/src/components/AppUpdateDialog/AppUpdateDialog.vue b/src/components/AppUpdateDialog/AppUpdateDialog.vue index 1f98cbd..f4f39c0 100644 --- a/src/components/AppUpdateDialog/AppUpdateDialog.vue +++ b/src/components/AppUpdateDialog/AppUpdateDialog.vue @@ -460,7 +460,6 @@ export default { .update-header { display: flex; flex-direction: column; - gap: 10rpx; margin-bottom: 28rpx; } @@ -470,7 +469,9 @@ export default { color: #222; } +/* 旧真机 WebView 不支持 flex gap,改用 margin 控制间距 */ .update-version { + margin-top: 10rpx; font-size: 24rpx; color: #5c6b77; } @@ -478,17 +479,16 @@ export default { .update-body { display: flex; flex-direction: column; - gap: 20rpx; } .update-row { display: flex; justify-content: space-between; align-items: flex-start; - gap: 20rpx; } .update-label { + margin-right: 20rpx; font-size: 26rpx; color: #86909c; flex-shrink: 0; @@ -507,7 +507,6 @@ export default { padding: 24rpx; display: flex; flex-direction: column; - gap: 12rpx; } .update-tip { @@ -516,8 +515,16 @@ export default { color: #4e5969; } -.update-progress-section { - margin-top: 8rpx; +.update-tip + .update-tip { + margin-top: 12rpx; +} + +/* 主体内各区块间距:不用 flex gap,兼容旧真机 */ +.update-row + .update-row, +.update-tip-box, +.update-progress-section, +.update-error { + margin-top: 20rpx; } .update-progress-head { @@ -554,11 +561,15 @@ export default { .update-actions { display: flex; - gap: 20rpx; margin-top: 32rpx; } -.update-actions :deep(.u-button) { +.update-actions ::v-deep .u-button { flex: 1; } + +/* 旧真机不支持 flex gap,按钮间距用兄弟选择器 margin 兜底 */ +.update-actions ::v-deep .u-button + .u-button { + margin-left: 20rpx; +} diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index 463221c..f892107 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -1066,7 +1066,6 @@ export default { .update-header { display: flex; flex-direction: column; - gap: 10rpx; margin-bottom: 28rpx; } @@ -1076,7 +1075,9 @@ export default { color: #222; } +/* 旧真机 WebView 不支持 flex gap,改用 margin 控制间距 */ .update-version { + margin-top: 10rpx; font-size: 24rpx; color: #5c6b77; } @@ -1084,17 +1085,16 @@ export default { .update-body { display: flex; flex-direction: column; - gap: 20rpx; } .update-row { display: flex; justify-content: space-between; align-items: flex-start; - gap: 20rpx; } .update-label { + margin-right: 20rpx; font-size: 26rpx; color: #86909c; flex-shrink: 0; @@ -1113,7 +1113,6 @@ export default { padding: 24rpx; display: flex; flex-direction: column; - gap: 12rpx; } .update-tip { @@ -1122,8 +1121,16 @@ export default { color: #4e5969; } -.update-progress-section { - margin-top: 8rpx; +.update-tip + .update-tip { + margin-top: 12rpx; +} + +/* 主体内各区块间距:不用 flex gap,兼容旧真机 */ +.update-row + .update-row, +.update-tip-box, +.update-progress-section, +.update-error { + margin-top: 20rpx; } .update-progress-head { @@ -1160,14 +1167,18 @@ export default { .update-actions { display: flex; - gap: 20rpx; margin-top: 32rpx; } -.update-actions :deep(.u-button) { +.update-actions ::v-deep .u-button { flex: 1; } +/* 旧真机不支持 flex gap,按钮间距用兄弟选择器 margin 兜底 */ +.update-actions ::v-deep .u-button + .u-button { + margin-left: 20rpx; +} + .header-section { text-align: left; margin-bottom: 60rpx; diff --git a/src/pages/settings/about.vue b/src/pages/settings/about.vue index 101a8de..bb8bfd5 100644 --- a/src/pages/settings/about.vue +++ b/src/pages/settings/about.vue @@ -622,7 +622,6 @@ export default { .update-header { display: flex; flex-direction: column; - gap: 10rpx; margin-bottom: 28rpx; } @@ -632,7 +631,9 @@ export default { color: #222; } +/* 旧真机 WebView 不支持 flex gap,改用 margin 控制间距 */ .update-version { + margin-top: 10rpx; font-size: 24rpx; color: #5c6b77; } @@ -640,17 +641,16 @@ export default { .update-body { display: flex; flex-direction: column; - gap: 20rpx; } .update-row { display: flex; justify-content: space-between; align-items: flex-start; - gap: 20rpx; } .update-label { + margin-right: 20rpx; font-size: 26rpx; color: #86909c; flex-shrink: 0; @@ -669,7 +669,6 @@ export default { padding: 24rpx; display: flex; flex-direction: column; - gap: 12rpx; } .update-tip { @@ -678,8 +677,16 @@ export default { color: #4e5969; } -.update-progress-section { - margin-top: 8rpx; +.update-tip + .update-tip { + margin-top: 12rpx; +} + +/* 主体内各区块间距:不用 flex gap,兼容旧真机 */ +.update-row + .update-row, +.update-tip-box, +.update-progress-section, +.update-error { + margin-top: 20rpx; } .update-progress-head { @@ -716,7 +723,15 @@ export default { .update-actions { display: flex; - gap: 20rpx; margin-top: 32rpx; } + +.update-actions ::v-deep .u-button { + flex: 1; +} + +/* 旧真机不支持 flex gap,按钮间距用兄弟选择器 margin 兜底 */ +.update-actions ::v-deep .u-button + .u-button { + margin-left: 20rpx; +}