38 lines
914 B
Vue
38 lines
914 B
Vue
<!--
|
||
|
||
App.vue本身不是页面,这里不能编写视图元素,也就是没有<template>
|
||
-->
|
||
<script setup>
|
||
import {
|
||
onLaunch
|
||
} from '@dcloudio/uni-app';
|
||
|
||
onLaunch(() => {
|
||
uni.hideTabBar()
|
||
// #ifdef MP-WEIXIN
|
||
const updateManager = wx.getUpdateManager() // 小程序版本更新管理器
|
||
updateManager.onCheckForUpdate(function(res) {
|
||
// 请求完新版本信息的回调
|
||
})
|
||
updateManager.onUpdateReady(function() {
|
||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||
updateManager.applyUpdate()
|
||
|
||
})
|
||
updateManager.onUpdateFailed(function() {
|
||
// 新版本下载失败
|
||
})
|
||
// #endif
|
||
});
|
||
</script>
|
||
|
||
<style lang="scss">
|
||
/** 每个页面公共css */
|
||
@import '@/commons/style/global.scss';
|
||
@import '@/commons/style/common.scss';
|
||
|
||
/** uni 组件样式覆盖 */
|
||
@import '@/commons/style/uni-overwrite.scss';
|
||
|
||
@import "uview-plus/index.scss";
|
||
</style> |