Commit f4e11231 authored by honghy's avatar honghy Committed by wux

存缓存 版本号顺序调整

parent 30e5fb15
<script>
export default {
onLaunch: function () {
//#ifdef APP-PLUS
plus.runtime.getProperty(plus.runtime.appid, function (wgtinfo) {
// 获取 app的version
let appversion = wgtinfo.version
let versionCode = wgtinfo.versionCode
// 存缓存 版本号
try {
uni.setStorageSync('appversion', appversion)
uni.setStorageSync('versionCode', versionCode)
} catch (e) {}
console.log('appversion:' + appversion)
})
//#endif
let Authorization = uni.getStorageSync('Authorization')
if (!Authorization || Authorization == '') {
if (
......@@ -18,19 +31,6 @@ export default {
if (Authorization && !this.$store.state.userInfo) {
this.$store.dispatch('updateUserInfo')
}
//#ifdef APP-PLUS
plus.runtime.getProperty(plus.runtime.appid, function (wgtinfo) {
// 获取 app的version
let appversion = wgtinfo.version
let versionCode = wgtinfo.versionCode
// 存缓存 版本号
try {
uni.setStorageSync('appversion', appversion)
uni.setStorageSync('versionCode', versionCode)
} catch (e) {}
console.log('appversion:' + appversion)
})
//#endif
},
onShow: function () {},
onHide: function () {}
......
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