You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<script> import Vue from 'vue' import util from './utils/util'; export default { onLaunch: function() { // #ifndef H5
this.updateManager(); // #endif
}, methods: { isLogin(){ return !!uni.getStorageSync('token'); }, updateManager(){ const updateManager = uni.getUpdateManager(); updateManager.onCheckForUpdate(res=>console.log('请求完新版本信息的回调-->',res.hasUpdate)); updateManager.onUpdateReady(function () { util.showModal({ title: '更新提示', content: '新版本已经准备好,请重启应用!', showCancel:false, confirmText:'重启', success:res=>updateManager.applyUpdate(), }) }); updateManager.onUpdateFailed(err=>console.log('版本更新失败——>',err)); }, } } </script>
<style> /*每个页面公共css */ page{ background-color: #f2f2f7; } view,scroll-view,text,picker{ box-sizing: border-box; } .ox-dark-mask{ position: fixed; left: 0; top: var(--window-top); right: 0; bottom: 0; background-color: rgba(0, 0, 0, .5); }
/* btn hover-class */ .hover-active{ position: relative; overflow: hidden; }
.hover-active::after{ content: ''; position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 2; background-color: rgba(0,0,0,.1); } /* btn hover-class */ </style>
|