From 6afb492942b17ebdb80f8e57af1b0df7ba5ee821 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 09 四月 2026 15:29:50 +0800
Subject: [PATCH] fix: 版本更新修改
---
src/pages/login.vue | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/src/pages/login.vue b/src/pages/login.vue
index 6d93dfb..ee49113 100644
--- a/src/pages/login.vue
+++ b/src/pages/login.vue
@@ -183,7 +183,7 @@
sendClientIdToServer();
// 鍚姩瀹氭椂鑾峰彇鏈娑堟伅鏁伴噺鐨勫畾鏃跺櫒
startNoticeCountTimer(userId);
- uni.switchTab({ url: "/pages/works" });
+ uni.switchTab({ url: "/pages/index" });
});
}
@@ -264,18 +264,33 @@
// #ifdef APP-PLUS
try {
+ // #ifdef APP-PLUS
// @ts-ignore
- if (plus?.runtime?.version) {
+ if (plus?.runtime?.getProperty) {
// @ts-ignore
- versionName.value = plus.runtime.version;
- console.log("[login-version] 褰撳墠鐜=APP-PLUS锛岀増鏈�=", versionName.value);
+ const appid = plus.runtime.appid;
+ // @ts-ignore
+ plus.runtime.getProperty(appid, (info) => {
+ const v = info?.version || info?.versionName || "";
+ if (v) {
+ versionName.value = String(v);
+ console.log("[login-version] 褰撳墠鐜=APP-PLUS锛岀増鏈�=", versionName.value);
+ } else {
+ console.log("[login-version] APP-PLUS 鑾峰彇鍒扮殑鐗堟湰瀛楁涓虹┖锛屼娇鐢ㄩ粯璁ゅ��:", versionName.value);
+ }
+ console.log("[login-version] 鏈�缁堢増鏈彿:", versionName.value);
+ });
+ } else {
+ console.log("[login-version] APP-PLUS 鐜涓嬬己灏� getProperty锛屼娇鐢ㄩ粯璁ゅ��:", versionName.value);
+ console.log("[login-version] 鏈�缁堢増鏈彿:", versionName.value);
}
+ // #endif
} catch (e) {
// 鑾峰彇澶辫触鏃朵娇鐢ㄩ粯璁ゅ��
console.log("[login-version] APP-PLUS 鑾峰彇鐗堟湰澶辫触:", e);
+ console.log("[login-version] 鏈�缁堢増鏈彿:", versionName.value);
}
// #endif
- console.log("[login-version] 鏈�缁堢増鏈彿:", versionName.value);
loadPassword();
getUserLoginFacotryList();
--
Gitblit v1.9.3