From 783d6b0aa3544b736dffdff21f5e374a26928cf3 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Fri, 26 Nov 2021 23:38:55 +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 | 25 ++++++++ pages.json | 9 +++ .../changeOwnerCommunity.vue | 60 +++++++++++++++++++ pages/my/my.vue | 15 ++++- 4 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 pages/changeOwnerCommunity/changeOwnerCommunity.vue diff --git a/api/community/communityApi.js b/api/community/communityApi.js index 7b37bce..f154e79 100755 --- a/api/community/communityApi.js +++ b/api/community/communityApi.js @@ -103,4 +103,29 @@ export function recoveryCommunityInfo(_obj){ }) }) +} + +/** + * 查询业主小区 + * @param {Object} dataObj 对象 + */ +export function getOwnerCommunitys(dataObj) { + return new Promise( + (resolve, reject) => { + request({ + url: url.listCommunitys, + method: "GET", + data: dataObj, + //动态数据 + success: function(res) { + if (res.statusCode == 200) { + let _communtiys = res.data.communitys; + resolve(_communitys); + } + }, + fail: function(e) { + reject(e); + } + }); + }) } \ No newline at end of file diff --git a/pages.json b/pages.json index 4ed83e0..cbf1fc6 100755 --- a/pages.json +++ b/pages.json @@ -611,6 +611,15 @@ "enablePullDownRefresh": false } } + ,{ + "path" : "pages/changeOwnerCommunity/changeOwnerCommunity", + "style" : + { + "navigationBarTitleText": "切换小区", + "enablePullDownRefresh": false + } + + } ], "tabBar": { "color": "#272636", diff --git a/pages/changeOwnerCommunity/changeOwnerCommunity.vue b/pages/changeOwnerCommunity/changeOwnerCommunity.vue new file mode 100644 index 0000000..7eed462 --- /dev/null +++ b/pages/changeOwnerCommunity/changeOwnerCommunity.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/pages/my/my.vue b/pages/my/my.vue index 071faa6..7627c2a 100755 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -24,10 +24,13 @@ - + - - 我的小区 + + 切换小区 + + + {{currentCommunityName}} @@ -237,6 +240,12 @@ url: '/pages/myAccount/myAccount', }); }, + //切换小区 + _changeCommunity:function(){ + uni.navigateTo({ + url:"/pages/changeOwnerCommunity/changeOwnerCommunity" + }); + }, } };