From 05b06d647e713aecce3caf5bf64e0f669a49c07e Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Thu, 29 Feb 2024 11:13:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/community/communityApi.js | 10 ++++++++++ api/user/userApi.js | 1 + components/index/index-menu.vue | 15 +++++++-------- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/api/community/communityApi.js b/api/community/communityApi.js index a0142e5..3d569f2 100644 --- a/api/community/communityApi.js +++ b/api/community/communityApi.js @@ -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 ''; +} + + /** * 查询当前小区 * diff --git a/api/user/userApi.js b/api/user/userApi.js index 5d0e415..e448008 100644 --- a/api/user/userApi.js +++ b/api/user/userApi.js @@ -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, diff --git a/components/index/index-menu.vue b/components/index/index-menu.vue index 6b506e1..443bdff 100644 --- a/components/index/index-menu.vue +++ b/components/index/index-menu.vue @@ -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() {