diff --git a/pages/settings/about.vue b/pages/settings/about.vue index 6e5e27a..101a8de 100644 --- a/pages/settings/about.vue +++ b/pages/settings/about.vue @@ -79,6 +79,28 @@ + + + + + + 检查结果 + {{ checkResultTitle || '未发现新版本' }} + + + + + 未弹出「发现新版本」的原因: + {{ checkResultMessage || '未知' }} + {{ checkResultDetail }} + + + + + + + + @@ -107,7 +129,12 @@ export default { url: '', sha256: '', publishedAtUtc: '' - } + }, + // ===== 检查结果弹窗:未发现新版本时展示原因(便于真机排查) ===== + showCheckResultDialog: false, + checkResultTitle: '', + checkResultMessage: '', + checkResultDetail: '' }; }, onLoad() { @@ -137,12 +164,8 @@ export default { if (hasNewVersion) { return; } - // 没有新版本:区分「检查失败」与「已是最新」 - if (this.updateErrorMessage) { - uni.showToast({ title: '更新检查失败', icon: 'none' }); - } else { - uni.showToast({ title: '当前已是最新版本', icon: 'none' }); - } + // 未发现新版本:弹出「检查结果」弹窗,展示不弹新版本的原因(便于真机排查) + this.showCheckResultDialog = true; }) .finally(() => { this.updateChecking = false; @@ -172,11 +195,13 @@ export default { hasCheckedUpdate: this.hasCheckedUpdate, isCheckingUpdate: this.isCheckingUpdate }); + this.setCheckResult('正在检查中', '上一次检查还未结束或已检查过,请稍后再试。'); return false; } if (typeof plus === 'undefined' || !plus.runtime) { this.logUpdateStep('checkForAppUpdate -> 非 APP-PLUS 环境,跳过更新检查'); + this.setCheckResult('当前环境不支持更新检查', '仅在 APP-PLUS(打包后的 App)环境中支持版本检查。'); return false; } @@ -201,13 +226,20 @@ export default { this.logUpdateStep('checkForAppUpdate -> 标准化后的远端配置', latestInfo || {}); if (!currentVersion) { - this.logUpdateStep('checkForAppUpdate -> 未获取到当前应用版本,无法比较', { currentVersion }); - this.updateErrorMessage = '获取当前应用版本失败'; - return false; + // 与登录页保持一致:读版本为空时不要中止流程,交给 isVersionNewer 继续比较。 + // 否则真机 getProperty 回调慢/未及时触发(3s 超时返回空)时, + // 关于页会被这里拦截不弹窗,而登录页没有此拦截却正常弹窗。 + this.logUpdateStep('checkForAppUpdate -> 未获取到当前应用版本,继续比较', { currentVersion }); + this.setCheckResult('未能读取当前应用版本', 'plus.runtime.getProperty 未返回版本号(可能回调超时),将按远端版本进行比较。'); } if (!latestInfo || !latestInfo.version || !latestInfo.url) { this.logUpdateStep('checkForAppUpdate -> 远端配置缺少必要字段,结束', latestInfo || {}); + this.setCheckResult( + '远端配置缺少必要字段', + '最新版本配置缺少 version 或 url,无法进行比较。', + `远端返回:${JSON.stringify(latestInfo || {})}` + ); return false; } @@ -220,6 +252,10 @@ export default { if (!isNewer) { this.logUpdateStep('checkForAppUpdate -> 远端版本不高于当前版本,不弹窗'); + this.setCheckResult( + '当前已是最新版本', + `本机版本 ${currentVersion || '未知'},远端最新 ${latestInfo.version},无需更新。` + ); return false; } @@ -230,6 +266,7 @@ export default { sha256: String(latestInfo.sha256 || '').trim(), publishedAtUtc: String(latestInfo.publishedAtUtc || '').trim() }; + this.setCheckResult('', '', ''); this.showUpdateDialog = true; this.logUpdateStep('checkForAppUpdate -> 发现新版本,显示更新弹窗', this.updateInfo); return true; @@ -237,6 +274,11 @@ export default { this.logUpdateStep('checkForAppUpdate -> 检查异常', error); console.warn('[update] check failed:', error); this.updateErrorMessage = error?.message || '更新检查失败'; + this.setCheckResult( + '更新检查失败', + '获取更新配置时出错,可能是网络不通、域名无法访问或明文流量被拦截。', + `错误信息:${error?.message || error?.errMsg || '未知错误'}` + ); return false; } finally { this.isCheckingUpdate = false; @@ -389,6 +431,14 @@ export default { this.updateErrorMessage = ''; this.logUpdateStep('closeUpdateDialog -> 用户取消更新,弹窗关闭'); }, + setCheckResult(title, message, detail) { + this.checkResultTitle = title || ''; + this.checkResultMessage = message || ''; + this.checkResultDetail = detail || ''; + }, + closeCheckResultDialog() { + this.showCheckResultDialog = false; + }, confirmUpdateDownload() { if (this.isDownloadingUpdate) { this.logUpdateStep('confirmUpdateDownload -> 已在下载中,忽略重复点击'); diff --git a/pages/work/order/order-review-comps/OrderList.vue b/pages/work/order/order-review-comps/OrderList.vue index d485d05..a80b62a 100644 --- a/pages/work/order/order-review-comps/OrderList.vue +++ b/pages/work/order/order-review-comps/OrderList.vue @@ -358,9 +358,9 @@ flex: 1; text-align: center; min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + white-space: normal; + word-break: break-all; + line-height: 1.4; font-size: 29rpx; } diff --git a/pages/work/order/order-review-comps/ReviewDetail.vue b/pages/work/order/order-review-comps/ReviewDetail.vue index 8bfad5c..93b412f 100644 --- a/pages/work/order/order-review-comps/ReviewDetail.vue +++ b/pages/work/order/order-review-comps/ReviewDetail.vue @@ -212,6 +212,10 @@