57 lines
1.5 KiB
Vue
57 lines
1.5 KiB
Vue
<script>
|
|
export default {
|
|
onLaunch: function() {
|
|
uni.cache.autoRemove()
|
|
// const updateManager = wx.getUpdateManager()
|
|
|
|
// updateManager.onCheckForUpdate(function(res) {
|
|
// // 请求完新版本信息的回调
|
|
// console.log(res.hasUpdate)
|
|
// if (res.hasUpdate) {
|
|
// wx.showToast({
|
|
// title: "即将有更新请留意"
|
|
// });
|
|
// }
|
|
// })
|
|
// updateManager.onUpdateReady(function() {
|
|
// wx.showModal({
|
|
// title: '更新提示',
|
|
// content: '新版本已经准备好,是否重启应用?',
|
|
// success: function(res) {
|
|
// if (res.confirm) {
|
|
// // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
|
// updateManager.applyUpdate()
|
|
// } else {
|
|
// wx.showToast({
|
|
// icon: "none",
|
|
// title: "小程序下一次「冷启动」时会使用新版本"
|
|
// });
|
|
// wx.exitMiniProgram();
|
|
// }
|
|
// }
|
|
// })
|
|
// })
|
|
// updateManager.onUpdateFailed(function() {
|
|
// // 新版本下载失败
|
|
// wx.showToast({
|
|
// icon: "none",
|
|
// title: "更新失败,下次启动继续..."
|
|
// });
|
|
// })
|
|
},
|
|
async onShow() {
|
|
this.$store.dispatch("HeightActions"); //获取随时获取页面的高度
|
|
|
|
},
|
|
onHide: function() {}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
@import '@/uni_modules/uview-ui/index.scss';
|
|
/* #ifndef APP-PLUS-NVUE */
|
|
@import './common/css/uni.scss';
|
|
/* #endif */
|
|
/* uni.scss */
|
|
@import './common/css/flex.css';
|
|
</style> |