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 |   67 ++++++++++++++++++++++++++++++++-
 1 files changed, 65 insertions(+), 2 deletions(-)

diff --git a/src/pages/mine.vue b/src/pages/mine.vue
index 40a2645..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>
 
@@ -150,9 +181,36 @@
 .mine-page {
   min-height: 100vh;
 	padding: 1.25rem;
-	padding-top: env(safe-area-inset-top);
+	/* 涓烘墍鏈夎澶囪缃熀纭�padding-top */
+	padding-top: 40px;
 	position: relative;
   background: linear-gradient( 225deg, #E7F1FF 0%, rgba(255,255,255,0) 74%, rgba(255,255,255,0) 100%);
+  
+	/* iOS璁惧浣跨敤env()鍑芥暟澶勭悊瀹夊叏鍖哄煙 */
+	padding-top: env(safe-area-inset-top);
+	
+	/* 涓哄畨鍗撹澶囪缃洿澶х殑椤堕儴鍐呰竟璺� */
+	/* #ifdef APP-PLUS && !MP && !H5 */
+	padding-top: 45px;
+	/* #endif */
+	
+	/* H5鍜屽皬绋嬪簭骞冲彴鐨勯�氱敤鏍峰紡 */
+	/* #ifdef H5 || MP */
+	padding-top: 30px;
+	/* #endif */
+}
+
+/* 鐗堟湰鍙� */
+.version-wrap {
+  width: 100%;
+  text-align: center;
+  margin-top: 18px;
+  padding-bottom: 14px;
+}
+
+.version-text {
+  font-size: 12px;
+  color: #999;
 }
 
 /* 椤堕儴涓汉淇℃伅鍗� */
@@ -162,6 +220,11 @@
   align-items: center;
   color: #333;
   margin: 1.25rem 0;
+  
+  /* 涓哄畨鍗撹澶囬澶栬皟鏁村崱鐗囦綅缃� */
+	/* #ifdef APP-PLUS && !MP && !H5 */
+	margin-top: 15px;
+	/* #endif */
 
   .left {
     display: flex;

--
Gitblit v1.9.3