调整 token错误更新

This commit is contained in:
浅念
2026-05-08 13:28:09 +08:00
parent bdd6bd1066
commit 845dff1ef7
5 changed files with 30 additions and 20 deletions
+14 -14
View File
@@ -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 => {