新增动态获取version
This commit is contained in:
@@ -26,12 +26,17 @@
|
||||
<up-icon name="arrow-right" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="version">1.1.14</view>
|
||||
<view class="version">{{ version }}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { linkTo } from '@/utils/app.js';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
|
||||
const version = ref('');
|
||||
|
||||
// 退出登录
|
||||
function logout() {
|
||||
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>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user