Commit f23bc66c authored by honghy's avatar honghy

存缓存 版本号顺序调整

parent 2dbb69b0
<script> <script>
export default { export default {
onLaunch: function () { 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') let Authorization = uni.getStorageSync('Authorization')
if (!Authorization || Authorization == '') { if (!Authorization || Authorization == '') {
if ( if (
...@@ -18,19 +31,6 @@ export default { ...@@ -18,19 +31,6 @@ export default {
if (Authorization && !this.$store.state.userInfo) { if (Authorization && !this.$store.state.userInfo) {
this.$store.dispatch('updateUserInfo') 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 () {}, onShow: function () {},
onHide: 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