修改显示小区bug
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -161,6 +161,8 @@
|
||||
// console.log('33333',res)
|
||||
if(res.code === 200){
|
||||
uni.setStorageSync('token', res.data.token);
|
||||
// 清掉上次账号的小区缓存,防止新账号显示旧小区
|
||||
uni.removeStorageSync('currentVillage');
|
||||
// 存用户ID
|
||||
// if(res.data) {
|
||||
// // 存当前绑定的小区ID,0 表示未绑定
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<!-- 退出登录按钮 -->
|
||||
<view class="logout-btn-wrap">
|
||||
<button class="logout-btn" :disabled="!phoneNumber" @tap="handleLogout">
|
||||
<button class="logout-btn" @tap="handleLogout">
|
||||
退出登录
|
||||
</button>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user