fix:用户中心新增测试版本号

This commit is contained in:
2026-05-14 14:34:02 +08:00
parent 9a6ca0700e
commit efff88db8e
2 changed files with 16 additions and 0 deletions

View File

@@ -69,6 +69,10 @@ onMounted(() => {
const envVersion = accountInfo.miniProgram.envVersion;
if (envVersion !== "release") showLogout.value = true;
});
/* global __BUILD_TIME__ */
/** 构建时刻,由 vite.config.js define 在打包时自动注入;仅开发/体验版展示 */
const buildVersion = typeof __BUILD_TIME__ !== 'undefined' ? __BUILD_TIME__ : '';
</script>
<template>
@@ -140,6 +144,10 @@ onMounted(() => {
:onClick="toAudioTestPage"
v-if="showLogout"
/>
<UserItem
title="版本信息"
v-if="showLogout"
>{{ buildVersion }}</UserItem>
<UserItem
title="退出登录(仅用于测试)"
:onClick="logout"