This commit is contained in:
Zy
2026-06-10 09:18:22 +08:00
3 changed files with 21 additions and 7 deletions

View File

@@ -221,8 +221,8 @@ const handleLogin = () => {
if (res.data) {
uni.setStorageSync('token', res.data.token)
// 存用户ID
if (res.data.userId) {
uni.setStorageSync('userId', res.data.userId)
if (res.data.user.userId) {
uni.setStorageSync('userId', res.data.user.userId)
}
// 清掉上次账号的小区缓存,防止新账号显示旧小区
uni.removeStorageSync('currentVillage')