From 12e71c59168070f5525ad5d2ed0d9859033746d0 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 09 四月 2026 16:09:41 +0800
Subject: [PATCH] fix: 完成自动更新

---
 src/pages/mine.vue |   46 +++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 45 insertions(+), 1 deletions(-)

diff --git a/src/pages/mine.vue b/src/pages/mine.vue
index 0961130..fa6e582 100644
--- a/src/pages/mine.vue
+++ b/src/pages/mine.vue
@@ -73,6 +73,12 @@
         <view class="card-illu faq"></view>
       </view>
     </view> -->
+
+    <view class="version-wrap">
+      <text class="version-text">鐗堟湰鍙凤細{{ versionName }}</text>
+    </view>
+
+    <DownloadProgressMask />
   </view>
 </template>
 
@@ -81,10 +87,11 @@
 import config from '@/config.js'
 import { getUserProfile } from "@/api/system/user";
 import useUserStore from '@/store/modules/user'
+import DownloadProgressMask from "@/components/DownloadProgressMask.vue";
 const userStore = useUserStore()
 const name = userStore.name;
 const roleName = userStore.roleName;
-const version = config.appInfo.version;
+const versionName = ref(config?.appInfo?.version || "1.0.0");
 
 const avatar = ref(userStore.avatar);
 // rem 鍩哄噯锛�1rem = 16px锛堝鏈変笉鍚岃璋冩暣 REM_BASE 鎴栨牱寮忔暟鍊硷級
@@ -142,6 +149,30 @@
 	// 璁剧疆鐢ㄦ埛淇℃伅
 	// 璁剧疆鐢ㄦ埛淇℃伅
 	userStore.getInfo()
+
+  // #ifdef MP-WEIXIN
+  try {
+    const accountInfo = uni.getAccountInfoSync();
+    if (accountInfo?.miniProgram?.version) {
+      versionName.value = String(accountInfo.miniProgram.version);
+    }
+  } catch (e) {}
+  // #endif
+
+  // #ifdef APP-PLUS
+  try {
+    // @ts-ignore
+    if (plus?.runtime?.getProperty) {
+      // @ts-ignore
+      const appid = plus.runtime.appid;
+      // @ts-ignore
+      plus.runtime.getProperty(appid, (info) => {
+        const v = info?.version || info?.versionName || info?.appVersion || "";
+        if (v) versionName.value = String(v);
+      });
+    }
+  } catch (e) {}
+  // #endif
 });
 </script>
 
@@ -169,6 +200,19 @@
 	/* #endif */
 }
 
+/* 鐗堟湰鍙� */
+.version-wrap {
+  width: 100%;
+  text-align: center;
+  margin-top: 18px;
+  padding-bottom: 14px;
+}
+
+.version-text {
+  font-size: 12px;
+  color: #999;
+}
+
 /* 椤堕儴涓汉淇℃伅鍗� */
 .profile-card {
   display: flex;

--
Gitblit v1.9.3