修复bug

This commit is contained in:
zhouyanli
2026-08-11 14:52:25 +08:00
parent 3757033744
commit 839f3ee1b7
6 changed files with 56 additions and 23 deletions

View File

@@ -98,6 +98,7 @@
import { ref, computed } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { getLoginPassword } from '../../api/api.js'
import { clearAccountStorage } from '../../api/request.js'
import PrivacyPopup from '@/components/privacy-popup/privacy-popup.vue'
import { usePermStore } from '@/stores/usePermStore'
@@ -204,13 +205,13 @@ const handleLogin = () => {
cid: push_cid
}
permStore.clearPerm()
// 清除上个账号的所有缓存,防止新账号显示旧数据
clearAccountStorage()
getLoginPassword(params)
.then(res => {
// console.log('33333',res)
if (res.code === 200) {
uni.setStorageSync('token', res.data.token)
// 清掉上次账号的小区缓存,防止新账号显示旧小区
uni.removeStorageSync('currentVillage')
// 存用户ID
// if(res.data) {
// // 存当前绑定的小区ID,0 表示未绑定