修复bug

This commit is contained in:
zhouyanli
2026-08-15 16:43:34 +08:00
parent 53ea3996a0
commit 365391b490
6 changed files with 25 additions and 40 deletions

View File

@@ -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' })
}
})
}