Commit 5fbbf2c4 authored by June's avatar June

feature: appjs

parent af43e5d9
<script>
<script>
import { mapActions } from 'vuex'
import { checkLoginStatus } from '@/apis/user.js'
import { login_wx } from '@/utils/modules/login.js'
......@@ -20,37 +20,37 @@ export default {
}
})
.catch(err => console.log(err))
},
methods: {
},
methods: {
...mapActions('systemInfo', ['setSystemInfo', 'setMenuButtonInfo']),
...mapActions('user', ['setLocation', 'setLoginStatus']),
...mapActions('cart', ['setCount']),
// 检查更新
...mapActions('cart', ['setCount']),
// 检查更新
checkUpdate() {
if (wx.canIUse('getUpdateManager')) {
const updateManager = uni.getUpdateManager()
// 请求完新版本信息的回调
// updateManager.onCheckForUpdate(res => {
// console.log(res.hasUpdate)
// })
updateManager.onUpdateReady(() => {
uni.showModal({
title: '是否更新',
content: '新版本已经准备好,是否重启应用?',
success: res => {
if(res.confirm) updateManager.applyUpdate()
}
})
})
// updateManager.applyUpdate()
updateManager.onUpdateFailed(() => {
this.$toast({title: "更新失败,请检查您的网络是否正常"})
if (wx.canIUse('getUpdateManager')) {
const updateManager = uni.getUpdateManager()
// 请求完新版本信息的回调
// updateManager.onCheckForUpdate(res => {
// console.log(res.hasUpdate)
// })
updateManager.onUpdateReady(() => {
uni.showModal({
title: '是否更新',
content: '新版本已经准备好,是否重启应用?',
success: res => {
if(res.confirm) updateManager.applyUpdate()
}
})
})
// updateManager.applyUpdate()
updateManager.onUpdateFailed(() => {
this.$toast({title: "更新失败,请检查您的网络是否正常"})
})
}
}
}
}
}
}
</script>
......@@ -59,10 +59,10 @@ export default {
@import url("@/styles/layout.css");
/* 隐藏scrollbar 滚动条 */
::-webkit-scrollbar {
display:none;
width:0;
height:0;
color:transparent;
::-webkit-scrollbar {
display:none;
width:0;
height:0;
color:transparent;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment