123456789101112131415161718192021222324252627282930313233343536 |
- <script>
- import global from '@/mixins/global.js'
- export default {
- mixins: [global],
- onLaunch: function() {
- const updateManager = uni.getUpdateManager()
- updateManager.onCheckForUpdate(function(res) {
- console.log(res.hasUpdate)
- })
- updateManager.onUpdateReady(function(res) {
- uni.showModal({
- title: '更新提示',
- content: '新版本已经准备好,是否重启小程序?',
- success(res) {
- if (res.confirm) {
- updateManager.applyUpdate()
- }
- }
- })
- })
-
- this.$store.dispatch('app/initDevice')
- this.initSetSystemInfo() // 初始化系统程序
- }
- }
- </script>
- <style lang="scss">
- page {
- min-height: 100%;
- background: #f7f7f7;
- }
- </style>
|