调整 token错误更新
This commit is contained in:
+14
-14
@@ -88,21 +88,21 @@ export default {
|
||||
homemapurl:''
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
// 数据加载逻辑
|
||||
if (!uni.getStorageSync('token')) {
|
||||
this.mini_login().then(() => {
|
||||
this.bannerListfn()
|
||||
this.configListfn()
|
||||
this.barragelist()
|
||||
this.$refs.paging && this.$refs.paging.reload()
|
||||
})
|
||||
}else{
|
||||
this.bannerListfn()
|
||||
this.configListfn()
|
||||
this.barragelist()
|
||||
this.$refs.paging && this.$refs.paging.reload()
|
||||
async onLoad(options) {
|
||||
const token = uni.getStorageSync('token')
|
||||
if (!token) {
|
||||
await this.mini_login()
|
||||
} else {
|
||||
const refreshPromise = getApp().globalData.tokenRefreshPromise
|
||||
if (refreshPromise) {
|
||||
const result = await refreshPromise
|
||||
if (!result.success) return
|
||||
}
|
||||
}
|
||||
this.bannerListfn()
|
||||
this.configListfn()
|
||||
this.barragelist()
|
||||
this.$refs.paging && this.$refs.paging.reload()
|
||||
},
|
||||
onShow() {
|
||||
this.getFuzzy().then(res => {
|
||||
|
||||
Reference in New Issue
Block a user