修改显示小区bug

This commit is contained in:
zhouyanli
2026-06-04 17:01:28 +08:00
parent ade0d2d547
commit 2ba24f2320
4 changed files with 9 additions and 2 deletions

View File

@@ -224,6 +224,8 @@ const handleLogin = () => {
if (res.data.userId) {
uni.setStorageSync('userId', res.data.userId)
}
// 清掉上次账号的小区缓存,防止新账号显示旧小区
uni.removeStorageSync('currentVillage')
// 存当前绑定的小区ID,0 表示未绑定
const currentVillageId = res.data.currentVillageId || 0
uni.setStorageSync('currentVillageId', currentVillageId)