修复bug
This commit is contained in:
@@ -99,6 +99,7 @@
|
||||
<script setup>
|
||||
import { ref, computed, onUnmounted } from 'vue'
|
||||
import { getLoginBySms, getSendCode } from '../../api/api.js'
|
||||
import { clearAccountStorage } from '../../api/request.js'
|
||||
import PrivacyPopup from '@/components/privacy-popup/privacy-popup.vue'
|
||||
import { usePermStore } from '@/stores/usePermStore'
|
||||
|
||||
@@ -249,6 +250,8 @@ const handleLogin = () => {
|
||||
cid: push_cid
|
||||
}
|
||||
permStore.clearPerm()
|
||||
// 清除上个账号的所有缓存,防止新账号显示旧数据
|
||||
clearAccountStorage()
|
||||
getLoginBySms(params)
|
||||
.then(res => {
|
||||
if (res.code === 200) {
|
||||
@@ -259,8 +262,6 @@ const handleLogin = () => {
|
||||
if (res.data.user.userId) {
|
||||
uni.setStorageSync('userId', res.data.user.userId)
|
||||
}
|
||||
// 清掉上次账号的小区缓存,防止新账号显示旧小区
|
||||
uni.removeStorageSync('currentVillage')
|
||||
// 存当前绑定的小区ID,0 表示未绑定
|
||||
const currentVillageId = res.data.currentVillageId || 0
|
||||
uni.setStorageSync('currentVillageId', currentVillageId)
|
||||
|
||||
Reference in New Issue
Block a user