mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
优化代码
This commit is contained in:
parent
62c571eb26
commit
f412d880cf
@ -203,6 +203,13 @@ export function deleteOwnerMember(_data){
|
||||
*
|
||||
*/
|
||||
export function hasOwner(){
|
||||
let loginFlag = wx.getStorageSync(mapping.LOGIN_FLAG);
|
||||
let nowDate = new Date();
|
||||
//判断如果是APP
|
||||
|
||||
if (!loginFlag || loginFlag.expireTime < nowDate.getTime()) {
|
||||
return ;
|
||||
}
|
||||
let _ownerInfo = wx.getStorageSync(mapping.OWNER_INFO);
|
||||
if(_ownerInfo){
|
||||
uni.showToast({
|
||||
|
||||
@ -266,6 +266,7 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
hasOwner();
|
||||
uni.getStorage({
|
||||
key: 'ownerInfo',
|
||||
success: function (res) {
|
||||
@ -276,6 +277,7 @@
|
||||
});
|
||||
},
|
||||
_doCall: function() {
|
||||
|
||||
let _that = this;
|
||||
uni.makePhoneCall({
|
||||
// 手机号
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
<text class="text-grey">切换小区</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{currentCommunityName}}</text>
|
||||
<text class="text-grey text-sm">{{communityName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item arrow" @click="myAssets()">
|
||||
@ -87,12 +87,14 @@
|
||||
} from '../../utils/StorageUtil.js'
|
||||
|
||||
import mapping from '../../constant/MappingConstant.js'
|
||||
import {hasOwner} from '../../api/owner/ownerApi.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userInfo: {},
|
||||
headerImg: '',
|
||||
userName: '',
|
||||
communityName:'',
|
||||
// 用户信息
|
||||
ownerFlag: false, // 是否有业主信息 标记 如果有为 true 没有为false
|
||||
login: true
|
||||
@ -158,6 +160,7 @@
|
||||
"&fileTypeCd=10000";
|
||||
_that.headerImg = _headerImg;
|
||||
_that.userName = _owner.appUserName;
|
||||
_that.communityName = _owner.communityName;
|
||||
});
|
||||
},
|
||||
showLongModel: function() {
|
||||
@ -196,6 +199,7 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
hasOwner();
|
||||
this.vc.navigateTo({
|
||||
url: '/pages/my/myMenu?pageSign=myAssets'
|
||||
});
|
||||
@ -210,6 +214,7 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
hasOwner();
|
||||
this.vc.navigateTo({
|
||||
url: '/pages/my/myMenu?pageSign=myServices'
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user