spring
2026-04-09 12e71c59168070f5525ad5d2ed0d9859033746d0
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;