修复bug
This commit is contained in:
@@ -295,10 +295,14 @@
|
||||
saveHomeCache()
|
||||
}
|
||||
}).catch(err => {
|
||||
currentCommunity.value = '请绑定房屋'
|
||||
currentVillageId.value = ''
|
||||
uni.removeStorageSync('currentVillageId')
|
||||
saveHomeCache()
|
||||
// 有 token 才提示错误(无 token 用户正常浏览首页,API 401 属于预期行为)
|
||||
const token = uni.getStorageSync('token')
|
||||
if (token) {
|
||||
uni.showToast({ title: err.msg || '网络异常', icon: 'error' })
|
||||
uni.showToast({ title: err.msg || '网络异常', icon: 'none' })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user