diff --git a/App.vue b/App.vue index 93451c50..1b4f3046 100644 --- a/App.vue +++ b/App.vue @@ -34,7 +34,7 @@ page{ font-size: 28rpx; - padding-bottom: 120rpx; + padding-bottom: 180rpx; } .uicon-volume { diff --git a/api/login.js b/api/login.js index 00cac99c..c96b37e9 100644 --- a/api/login.js +++ b/api/login.js @@ -2,5 +2,6 @@ export const apiArr = { login: '/api/v1/wechat/multi-login', // 小程序登录 loginInfo: '/api/v1/wechat/mpusers/login-info', // 获取用户信息 loginGetPhone: '/api/v1/wechat/mpusers/get-phone', // 获取用户手机号 - loginGetUserPhone:"/api/v2/wechat/mpusers/get-phone" + loginGetUserPhone: "/api/v2/wechat/mpusers/get-phone", + getCommunityList: '/api/v2/wechat/mpuser-crud/community-owner/info', // 我的房产信息小区列表 } \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index be4a661c..f6973666 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -475,9 +475,9 @@ export default { } }, - onReachBottom() { + async onReachBottom() { if (this.flag) { - const res = this.getHomeBottom(); + const res = await this.getHomeBottom(); this.bottomList = this.bottomList.concat(res); } else { uni.showToast({ diff --git a/pages/login/login.vue b/pages/login/login.vue index 97965e6b..8f1da596 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -91,7 +91,8 @@ export default { uni.setStorageSync('shopId', res2.wshop_id); this.isLogin = true; - that.getUserInfo() + that.getUserInfo(); + that.getCommunityList(); }) }, (err) => { uni.hideLoading(); @@ -146,6 +147,8 @@ export default { uni.removeStorageSync('is_shop'); uni.removeStorageSync('shopId'); uni.removeStorageSync('order_dispatch_permission'); + uni.removeStorageSync('nickName'); + uni.removeStorageSync('changeCommData'); console.error('用户拒绝授权:', event.detail.errMsg); } }, @@ -153,8 +156,7 @@ export default { getUserInfo() { request(apiArr2.getUserInfo, "POST", { user_id: uni.getStorageSync('userId') - }).then(res => { - console.log('111111', res); + }, { silent: false }).then(res => { const { community_worker } = res; uni.setStorageSync('order_dispatch_permission', community_worker && community_worker[0].order_dispatch_permission == 1 || false); uni.setStorageSync('nickName', res.nick_name); @@ -162,6 +164,20 @@ export default { }) }, + // 获取已入住房源信息 + getCommunityList() { + request(apiArr.getCommunityList, 'POST', { + latitude: uni.getStorageSync('location').lat, + longitude: uni.getStorageSync('location').lng, + page_num: 1, + page_size: 10, + }, { silent: false }).then((res3) => { + const { rows: [{}] } = res3; + uni.setStorageSync("changeCommData",{ name: rows[0].name, id: rows[0].community_id }) + }) + }, + + // app端登录 async appLogin() { try { diff --git a/pages/user/index.vue b/pages/user/index.vue index 6a7e8c49..f5c6d686 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -45,7 +45,7 @@ - + 金币 0 | 价值0.00元 @@ -294,12 +294,14 @@ // 我的社区跳转 handleCommunityClick(){ - NavgateTo('/packages/community/index/index') + this.NotOpen(); + // NavgateTo('/packages/community/index/index') }, // 申请业主跳转 handleApplyOwnerClick(){ - NavgateTo(`/packages/community/index/index?types=2`) + this.NotOpen(); + // NavgateTo(`/packages/community/index/index?types=2`) }, // 我的设备跳转 @@ -309,7 +311,12 @@ // 我的申请跳转 handleMeApplyClick() { - NavgateTo(`/packages/community/ownerList/index`) + this.NotOpen(); + // NavgateTo(`/packages/community/ownerList/index`) + }, + headerGoldClick() { + this.NotOpen(); + // NavgateTo(`/packages/community/ownerList/index`) }, // 我的订单跳转