fix: 登录页版本号改为动态读取(WGT热更新后自动变)
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
<view class="header">
|
||||
<text class="logo">🏭</text>
|
||||
<text class="title">Track</text>
|
||||
<text class="version">T1.0.2</text>
|
||||
<text class="version">{{ appVersion }}</text>
|
||||
</view>
|
||||
|
||||
<view class="form">
|
||||
@ -18,9 +18,18 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { ref, onMounted } from "vue";
|
||||
import { post } from "../../utils/request";
|
||||
|
||||
// 🚀 动态版本号 — 热更新后自动变化
|
||||
const appVersion = ref("T1.0.2");
|
||||
onMounted(() => {
|
||||
try {
|
||||
const v = uni.getSystemInfoSync().appWgtVersion || uni.getSystemInfoSync().appVersion;
|
||||
if (v) appVersion.value = v.startsWith("T") ? v : "T" + v;
|
||||
} catch {}
|
||||
});
|
||||
|
||||
const username = ref("");
|
||||
const password = ref("");
|
||||
const loading = ref(false);
|
||||
|
||||
Reference in New Issue
Block a user