From 61bb43f7593ec42e2d0277badc00b8d37825866b Mon Sep 17 00:00:00 2001 From: HongxuanG <1359774872@qq.com> Date: Sun, 1 Nov 2026 17:54:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=96=E6=B6=88=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=90=8E=E7=99=BB=E5=BD=95=E9=A1=B5=E4=B8=8D=E5=86=8D=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=BC=B9=E6=A1=86=EF=BC=8C=E7=AD=89=E7=BA=A7=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E9=9D=9E=E5=BF=85=E5=A1=AB=E5=B9=B6=E5=8D=87=E8=87=B3?= =?UTF-8?q?1.1.17?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/manifest.json | 4 ++-- src/pages/storefabric/storeFabricManualIn.vue | 8 +++----- src/pages/sys/login/index.vue | 10 +++++++++- src/pages/sys/user/index.vue | 3 ++- src/uni_modules/app-upgrade/js_sdk/dialog.js | 11 ++++++++--- src/uni_modules/app-upgrade/js_sdk/index.js | 3 ++- 6 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/manifest.json b/src/manifest.json index 5960be7..e81abce 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,8 +2,8 @@ "name" : "浩拓织厂", "appid" : "__UNI__F79F300", "description" : "周尚-浩拓织厂", - "versionName" : "1.1.16", - "versionCode" : 116, + "versionName" : "1.1.17", + "versionCode" : 117, "transformPx" : false, "app-plus" : { "optimization" : { diff --git a/src/pages/storefabric/storeFabricManualIn.vue b/src/pages/storefabric/storeFabricManualIn.vue index 1f664e6..f105baf 100644 --- a/src/pages/storefabric/storeFabricManualIn.vue +++ b/src/pages/storefabric/storeFabricManualIn.vue @@ -376,10 +376,6 @@ export default { return; } const levelIds = normalizeLevelIds(this.detail.grey_fabric_level_id); - if (!levelIds.length) { - this.$u.toast('请选择等级'); - return; - } if (this.submitting) return; this.submitting = true; try { @@ -387,8 +383,10 @@ export default { fabric_piece_code: fabricPieceCode, actual_weight: actualWeight, electronic_scale_weight: actualWeight, - grey_fabric_level_id: levelIds, }; + if (levelIds.length) { + payload.grey_fabric_level_id = levelIds; + } const inspectorName = String(this.detail.inspector_name || '').trim(); if (inspectorName) { payload.inspector_name = inspectorName; diff --git a/src/pages/sys/login/index.vue b/src/pages/sys/login/index.vue index c7bd0a9..9154b79 100644 --- a/src/pages/sys/login/index.vue +++ b/src/pages/sys/login/index.vue @@ -431,10 +431,18 @@ export default { return { status: 0 }; } + // 用户已取消过该版本:登录页自动检查不再弹框 + const dismissedVersion = uni.getStorageSync('appUpdateDismissedVersion'); + if (dismissedVersion && String(dismissedVersion) === String(res.latest_version)) { + console.log('用户已取消该版本更新,跳过自动弹框:', dismissedVersion); + return { status: 0 }; + } + return { changelog: res.message + ',最新版本:' + res.latest_version, status: res.need_update ? 1 : 0, // 0 无新版本 | 1 有新版本 - path: res.download_url // 新apk地址 + path: res.download_url, // 新apk地址 + latest_version: res.latest_version }; } catch (error) { console.log('检查版本更新失败:', error); diff --git a/src/pages/sys/user/index.vue b/src/pages/sys/user/index.vue index 5a9f175..8917f9b 100644 --- a/src/pages/sys/user/index.vue +++ b/src/pages/sys/user/index.vue @@ -133,7 +133,8 @@ export default { return { changelog: res.message + ',最新版本:' + res.latest_version, status: res.need_update ? 1 : 0, - path: res.download_url + path: res.download_url, + latest_version: res.latest_version }; }, 1); // #endif diff --git a/src/uni_modules/app-upgrade/js_sdk/dialog.js b/src/uni_modules/app-upgrade/js_sdk/dialog.js index bcc46c4..164f96b 100644 --- a/src/uni_modules/app-upgrade/js_sdk/dialog.js +++ b/src/uni_modules/app-upgrade/js_sdk/dialog.js @@ -37,11 +37,12 @@ class AppDialog { } // 显示 - show(apkUrl, changelog) { + show(apkUrl, changelog, latestVersion = '') { this.drawView(changelog) this.maskEl.show() this.popupEl.show() this.apkUrl = apkUrl; + this.latestVersion = latestVersion || ''; } // 隐藏 @@ -309,8 +310,12 @@ class AppDialog { const buttonWidth = (this.viewWidth - this.viewPadding) / 2; if (e.clientY > maxTop - 40 && e.clientY < maxTop) { if (showCancel) { - // 取消 - // if(e.clientX>this.viewPadding && e.clientX this.viewPadding && e.clientX < this.viewPadding + buttonWidth) { + if (this.latestVersion) { + uni.setStorageSync('appUpdateDismissedVersion', String(this.latestVersion)); + } + } // 确定 if (e.clientX > maxLeft - buttonWidth && e.clientX < maxLeft) { upgrade.checkOs(this.apkUrl) diff --git a/src/uni_modules/app-upgrade/js_sdk/index.js b/src/uni_modules/app-upgrade/js_sdk/index.js index 3cfc543..aa6bd2a 100644 --- a/src/uni_modules/app-upgrade/js_sdk/index.js +++ b/src/uni_modules/app-upgrade/js_sdk/index.js @@ -40,7 +40,8 @@ class CheckUpate{ if(res.status===1){ const path=res.path || ''; const changeLog=res.changelog || ''; - appDialog.show(path,changeLog); + const latestVersion=res.latest_version || ''; + appDialog.show(path,changeLog,latestVersion); } }) this.storageTimeStamp()