优化代码

This commit is contained in:
wuxw 2024-02-29 11:13:36 +08:00
parent 55c6b92c84
commit 05b06d647e
3 changed files with 18 additions and 8 deletions

View File

@ -91,6 +91,16 @@ export function getCommunityName(){
return conf.DEFAULT_COMMUNITY_NAME;
}
export function getCommunityTel(){
let _currentCommunity = uni.getStorageSync("currentCommunityInfo")
if(_currentCommunity){
return _currentCommunity.sCommunityTel;
}
return '';
}
/**
* 查询当前小区
*

View File

@ -309,6 +309,7 @@ export function ownerLogin(_that, _data) {
uni.setStorageSync("currentCommunityInfo",{
communityId:_json.data.communityId,
communityName:_json.data.communityName,
sCommunityTel:_json.data.communityTel
});
uni.setStorageSync("ownerInfo",{
memberId:_json.data.memberId,

View File

@ -69,6 +69,8 @@
import {
getProperty
} from '../../api/property/propertyApi.js';
import {getCommunityName,getCommunityTel} from '../../api/community/communityApi.js';
export default {
name: "indexMenu",
@ -158,14 +160,11 @@
});
return;
}
hasOwner();
uni.getStorage({
key: 'ownerInfo',
success: function(res) {
_that.property = res.data;
_that.callPropertyModal = true;
}
});
this.property.sCommunityTel = getCommunityTel();
this.property.communityName = getCommunityName();
_that.callPropertyModal = true;
},
_doCall: function() {