新增动态获取version
This commit is contained in:
@@ -26,12 +26,17 @@
|
|||||||
<up-icon name="arrow-right" />
|
<up-icon name="arrow-right" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="version">1.1.14</view>
|
<view class="version">{{ version }}</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
import { linkTo } from '@/utils/app.js';
|
import { linkTo } from '@/utils/app.js';
|
||||||
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
|
const version = ref('');
|
||||||
|
|
||||||
// 退出登录
|
// 退出登录
|
||||||
function logout() {
|
function logout() {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
@@ -47,6 +52,16 @@ function logout() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
|
//#ifdef APP-PLUS
|
||||||
|
version.value = systemInfo.appWgtVersion;
|
||||||
|
//#endif
|
||||||
|
// #ifdef H5
|
||||||
|
version.value = systemInfo.appVersion;
|
||||||
|
// #endif
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user