Merge branch 'master' of http://gitea.bugtc.com/zhouyanli/property-manager-side
This commit is contained in:
@@ -224,6 +224,8 @@ const handleLogin = () => {
|
|||||||
if (res.data.userId) {
|
if (res.data.userId) {
|
||||||
uni.setStorageSync('userId', res.data.userId)
|
uni.setStorageSync('userId', res.data.userId)
|
||||||
}
|
}
|
||||||
|
// 清掉上次账号的小区缓存,防止新账号显示旧小区
|
||||||
|
uni.removeStorageSync('currentVillage')
|
||||||
// 存当前绑定的小区ID,0 表示未绑定
|
// 存当前绑定的小区ID,0 表示未绑定
|
||||||
const currentVillageId = res.data.currentVillageId || 0
|
const currentVillageId = res.data.currentVillageId || 0
|
||||||
uni.setStorageSync('currentVillageId', currentVillageId)
|
uni.setStorageSync('currentVillageId', currentVillageId)
|
||||||
|
|||||||
@@ -161,6 +161,8 @@
|
|||||||
// console.log('33333',res)
|
// console.log('33333',res)
|
||||||
if(res.code === 200){
|
if(res.code === 200){
|
||||||
uni.setStorageSync('token', res.data.token);
|
uni.setStorageSync('token', res.data.token);
|
||||||
|
// 清掉上次账号的小区缓存,防止新账号显示旧小区
|
||||||
|
uni.removeStorageSync('currentVillage');
|
||||||
// 存用户ID
|
// 存用户ID
|
||||||
// if(res.data) {
|
// if(res.data) {
|
||||||
// // 存当前绑定的小区ID,0 表示未绑定
|
// // 存当前绑定的小区ID,0 表示未绑定
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
<!-- 退出登录按钮 -->
|
<!-- 退出登录按钮 -->
|
||||||
<view class="logout-btn-wrap">
|
<view class="logout-btn-wrap">
|
||||||
<button class="logout-btn" :disabled="!phoneNumber" @tap="handleLogout">
|
<button class="logout-btn" @tap="handleLogout">
|
||||||
退出登录
|
退出登录
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
@clickItem="clickItem"
|
@clickItem="clickItem"
|
||||||
:info="bannerList"
|
:info="bannerList"
|
||||||
:current="current"
|
:current="current"
|
||||||
mode="round"
|
mode="default"
|
||||||
>
|
>
|
||||||
<swiper class="swiper-box" :current="current" @change="onSwiperChange" autoplay>
|
<swiper class="swiper-box" :current="current" @change="onSwiperChange" autoplay>
|
||||||
<swiper-item v-for="(item, index) in bannerList" :key="index">
|
<swiper-item v-for="(item, index) in bannerList" :key="index">
|
||||||
@@ -238,6 +238,8 @@ const goToReport = () => {
|
|||||||
}
|
}
|
||||||
// 获取当前小区
|
// 获取当前小区
|
||||||
const currentVillageData = () => {
|
const currentVillageData = () => {
|
||||||
|
// 先重置,避免新账号无小区时仍显示旧账号的小区
|
||||||
|
currentCommunity.value = '请选择小区'
|
||||||
getCurrentVillage()
|
getCurrentVillage()
|
||||||
.then(res => {
|
.then(res => {
|
||||||
const data = res.data
|
const data = res.data
|
||||||
@@ -306,6 +308,7 @@ const slelctHomeData = data => {
|
|||||||
onShow(() => {
|
onShow(() => {
|
||||||
getbannarData()
|
getbannarData()
|
||||||
getInspectionData()
|
getInspectionData()
|
||||||
|
currentVillageData()
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user