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