优化多业主测试登陆时 数据错误

Signed-off-by: java110 <928255095@qq.com>
This commit is contained in:
java110 2024-03-31 09:22:39 +00:00 committed by Gitee
parent 0392aaff64
commit 10b6548135
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 17 additions and 42 deletions

View File

@ -85,6 +85,8 @@
let that = this;
this.logoUrl = constant.url.baseUrl + 'logo.png';
//todo 退西
uni.removeStorageSync("ownerInfo");
uni.removeStorageSync("userInfo");
uni.removeStorageSync("JAVA110_USER_INFO");
uni.removeStorageSync("currentCommunityInfo");
removeUserLoginInfo();

View File

@ -1,12 +1,5 @@
<template>
<view>
<view class="bg-white">
<view class="cu-steps">
<view class="cu-item" :class="index>active?'':'text-green'" v-for="(item,index) in steps" :key="index">
<text :class="'cuIcon-' + item.cuIcon"></text> {{item.name}}
</view>
</view>
</view>
<view class="block__title">小区信息</view>
<view class="cu-list menu">
<view class="cu-item">
@ -40,15 +33,6 @@
<text class="text-grey text-sm">{{appUserName}}</text>
</view>
</view>
<!-- <view class="cu-item">
<view class="content">
<text class="cuIcon-card text-green"></text>
<text class="text-grey">身份证</text>
</view>
<view class="action">
<text class="text-grey text-sm">{{idCard}}</text>
</view>
</view> -->
<view class="cu-item">
<view class="content">
<text class="cuIcon-phone text-green"></text>
@ -60,10 +44,6 @@
</view>
</view>
<view class="button_up_blank"></view>
<view v-if="active == 1" class="cu-form-group justify-center">
<button class="cu-btn bg-red lg" @tap.native.stop="unbindOwner">解绑业主</button>
</view>
</view>
</template>
@ -71,26 +51,18 @@
// pages/viewBindOwner/viewBindOwner.js
import context from '../../lib/java110/Java110Context.js';
const constant = context.constant;
import {getCommunityName} from '@/api/community/communityApi.js'
import {
getCommunityId,
getCommunityName
} from '@/api/community/communityApi.js';
import {
loadLoginOwner
} from '../../api/owner/ownerApi.js';
export default {
data() {
return {
steps: [{
cuIcon: 'usefullfill',
name: '申请',
desc: ''
}, {
cuIcon: 'radioboxfill',
name: '审核中',
desc: ''
}, {
cuIcon: 'roundcheckfill',
name: '完成',
desc: ''
}],
active: 0,
areaName: '',
communityId: '',
communityName: '',
@ -115,16 +87,17 @@
*/
loadOwnerInfo: function() {
let _that = this;
context.getOwner(function(_ownerInfo) {
loadLoginOwner({
communityId:getCommunityId()
}).then(function(_ownerInfo) {
console.log(_ownerInfo)
if (_ownerInfo) {
let _active = _ownerInfo.state == '10000' ? 1 : 2;
_that.areaName = _ownerInfo.parentAreaName + _ownerInfo.areaName;
_that.communityId = _ownerInfo.communityId;
_that.appUserName = _ownerInfo.ownerName;
_that.appUserName = _ownerInfo.name;
_that.link = _ownerInfo.link;
_that.active = _active;
}
});
},
@ -187,4 +160,4 @@
text {
text-align: center;
}
</style>
</style>