From ec22a583ef0b16e5d3e14de7af9c47dc54392c21 Mon Sep 17 00:00:00 2001 From: liushaowen <565850092@qq.com> Date: Thu, 14 May 2020 16:21:26 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=89=A9=E4=B8=9A=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E3=80=91-=E3=80=90=E6=8E=A5=E5=8F=A3=E5=AF=B9=E5=BA=94v2?= =?UTF-8?q?=E3=80=91=20=20=20-=E5=88=98=E7=BB=8D=E6=96=87=20-2020/05/14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/property/property.js | 39 +++++++++++++------ .../pages/property/property.wxml | 2 +- .../pages/property/property.wxss | 2 +- .../associationDetail/associationDetail.js | 8 ++-- .../associationDetail/associationDetail.wxml | 8 ---- .../pages/joinassociation/joinassociation.js | 2 +- .../property/pages/topicDetail/topicDetail.js | 25 ++---------- .../pages/topicDetail/topicDetail.wxml | 3 +- .../property/pages/topicList/topicList.js | 6 +-- .../subpages/property/utils/api.js | 7 ---- epdc-resident-mp-yushan/utils/api.js | 2 +- epdc-resident-mp-yushan/utils/config.js | 4 +- 12 files changed, 46 insertions(+), 62 deletions(-) diff --git a/epdc-resident-mp-yushan/pages/property/property.js b/epdc-resident-mp-yushan/pages/property/property.js index 33eb216..0be4223 100644 --- a/epdc-resident-mp-yushan/pages/property/property.js +++ b/epdc-resident-mp-yushan/pages/property/property.js @@ -16,9 +16,17 @@ Page({ pageNo: 1, // 新闻列表-分页页码 pageSize: 10, // 新闻列表-分页页长 isLoading: true, - timeStamp:'' + timeStamp:'', + refreshFlag:true + }, + onHide:function(){ + if(this.data.refreshFlag){ + this.setData({ + tabList:[], + projectInfo:{} + }) + } }, - /** * 生命周期函数--监听页面加载 */ @@ -40,18 +48,22 @@ Page({ } // this.getRecommend(); }, - onReady:function(){ - this.initTab(); - }, /** * 生命周期函数--监听页面显示 */ onShow: function () { - + if(this.data.refreshFlag){ + this.initTab(); + }else{ + this.setData({ + refreshFlag:true + }) + } }, initTab(){ api.getPropertyProjectList().then((res)=>{ this.setData({ + currentTabIndex:0, tabList:res.data }); if(this.data.tabList.length>0){ @@ -135,6 +147,11 @@ Page({ wx.showToast({ title: '申请成功' }) + let info = this.data.projectInfo; + info.groupMemberFlag = '1'; + this.setData({ + projectInfo:info + }) }else{ wx.showToast({ title: '申请失败', @@ -142,20 +159,20 @@ Page({ }) } }).catch(err=>{ - wx.showToast({ - title: '网络错误,申请失败', - icon:"none" - }) + }) } } }) }else if(joinstatus == '1'){ wx.showToast({ - title: '已经申请,审核中', + title: '您已申请过加入该社群,请等待群主审核', icon:"none" }) }else if(joinstatus == '2'){ + this.setData({ + refreshFlag:false + }) wx.navigateTo({ url: `/subpages/property/pages/topicList/topicList?groupId=${groupid}&groupName=${groupname}&state=${state}` }) diff --git a/epdc-resident-mp-yushan/pages/property/property.wxml b/epdc-resident-mp-yushan/pages/property/property.wxml index 4fd944d..54b1039 100644 --- a/epdc-resident-mp-yushan/pages/property/property.wxml +++ b/epdc-resident-mp-yushan/pages/property/property.wxml @@ -45,7 +45,7 @@ 加入 + data-groupName="{{projectInfo.groupName}}" data-state="{{projectInfo.groupState}}" data-groupId="{{projectInfo.groupId}}" bindtap="joinGroup">{{projectInfo.groupMemberFlag=='0'?'加入':projectInfo.groupMemberFlag=='1'?'待审核':'进入'}} diff --git a/epdc-resident-mp-yushan/pages/property/property.wxss b/epdc-resident-mp-yushan/pages/property/property.wxss index e86d75f..c62faab 100644 --- a/epdc-resident-mp-yushan/pages/property/property.wxss +++ b/epdc-resident-mp-yushan/pages/property/property.wxss @@ -132,7 +132,7 @@ page { } .join-button{ height: 55rpx; - width: 100rpx; + width: 110rpx; border-radius: 60rpx; background: #F82424; color: white; diff --git a/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.js b/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.js index 21eaa80..8a3044e 100644 --- a/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.js +++ b/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.js @@ -37,25 +37,25 @@ Page({ // 跳转到 群介绍 navigateToIntroduce () { wx.navigateTo({ - url: `/subpages/association/pages/joinassociation/joinassociation?type=change&id=${this.data.userInfo.id}` + url: `/subpages/property/pages/joinassociation/joinassociation?type=change&id=${this.data.userInfo.id}` }) }, // 跳转到 群成员 navigateToMember () { wx.navigateTo({ - url: `/subpages/association/pages/associationMember/associationMember?id=${this.data.userInfo.id}&groupCategory=${this.data.userInfo.groupCategory}` + url: `/subpages/property/pages/associationMember/associationMember?id=${this.data.userInfo.id}&groupCategory=${this.data.userInfo.groupCategory}` }) }, // 跳转到 邀请好友 navigateToInvitation () { wx.navigateTo({ - url: `/subpages/association/pages/inviteFriend/inviteFriend?id=${this.data.userInfo.id}` + url: `/subpages/property/pages/inviteFriend/inviteFriend?id=${this.data.userInfo.id}` }) }, // 跳转到 入群审核 navigateToVerify () { wx.navigateTo({ - url: `/subpages/association/pages/incomingVerify/incomingVerify?id=${this.data.userInfo.id}` + url: `/subpages/property/pages/incomingVerify/incomingVerify?id=${this.data.userInfo.id}` }) }, // 选择图片 diff --git a/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.wxml b/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.wxml index c387dde..68d0ac5 100644 --- a/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.wxml +++ b/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.wxml @@ -16,10 +16,6 @@ {{userInfo.nickname}}(群主) - - - 解散群 - @@ -30,10 +26,6 @@ {{userInfo.topicNum}} 话题 - - {{userInfo.changeToIssueNum}} - 已转议题 - diff --git a/epdc-resident-mp-yushan/subpages/property/pages/joinassociation/joinassociation.js b/epdc-resident-mp-yushan/subpages/property/pages/joinassociation/joinassociation.js index 6ca4a79..6edab08 100644 --- a/epdc-resident-mp-yushan/subpages/property/pages/joinassociation/joinassociation.js +++ b/epdc-resident-mp-yushan/subpages/property/pages/joinassociation/joinassociation.js @@ -37,7 +37,7 @@ Page({ // 修改群介绍 navigateToChangeIntroduce () { wx.navigateTo({ - url: `/subpages/association/pages/changeIntroduce/changeIntroduce?id=${this.data.associationInfo.id}` + url: `/subpages/property/pages/changeIntroduce/changeIntroduce?id=${this.data.associationInfo.id}` }) }, // 获取社群详情 diff --git a/epdc-resident-mp-yushan/subpages/property/pages/topicDetail/topicDetail.js b/epdc-resident-mp-yushan/subpages/property/pages/topicDetail/topicDetail.js index 63b1acf..baa93f0 100644 --- a/epdc-resident-mp-yushan/subpages/property/pages/topicDetail/topicDetail.js +++ b/epdc-resident-mp-yushan/subpages/property/pages/topicDetail/topicDetail.js @@ -1,4 +1,4 @@ -import { getTopicDetail, getRemarkList, closeTopic, publishStatement, getCloseReason } from '../../utils/api' +import { getTopicDetail, getRemarkList, closeTopic, publishStatement } from '../../utils/api' import { getTimestamp } from '../../utils/common' const app = getApp() @@ -45,7 +45,6 @@ Page({ detailId: options.detailId, infoCompleted: app.globalData.infoCompleted }) - this.getCloseReason() }, onShow () { this.setData({ @@ -92,7 +91,7 @@ Page({ return false } else { wx.navigateTo({ - url: `/subpages/association/pages/replyOrRemark/replyOrRemark?topicId=${this.data.detailId}&faCommentId=` + url: `/subpages/property/pages/replyOrRemark/replyOrRemark?topicId=${this.data.detailId}&faCommentId=` }) } }, @@ -241,7 +240,7 @@ Page({ return false } wx.navigateTo({ - url: `/subpages/association/pages/changeToIssue/changeToIssue?topicId=${this.data.detailId}` + url: `/subpages/property/pages/changeToIssue/changeToIssue?topicId=${this.data.detailId}` }) }, // 支持某条评论 debounce防抖 @@ -405,7 +404,7 @@ Page({ return false } wx.navigateTo({ - url: `/subpages/association/pages/replyOrRemark/replyOrRemark?topicId=${this.data.detailId}&faCommentId=${e.detail.commentId}` + url: `/subpages/property/pages/replyOrRemark/replyOrRemark?topicId=${this.data.detailId}&faCommentId=${e.detail.commentId}` }) }, // 评论列表 type 切换 @@ -440,22 +439,6 @@ Page({ console.log(err) }) }, - // 获取关闭原因 - getCloseReason () { - getCloseReason(this.data.detailId).then(res => { - console.log('获取关闭原因', res) - if (res.data.length > 0) { - this.setData({ - closeObj: { - createdTime: res.data[0].createdTime, - processingOpinions: res.data[0].processingOpinions - } - }) - } - }).catch(err => { - console.log(err) - }) - }, checkIsCompleteInfo () { if (this.data.infoCompleted == 0) { this.setData({ diff --git a/epdc-resident-mp-yushan/subpages/property/pages/topicDetail/topicDetail.wxml b/epdc-resident-mp-yushan/subpages/property/pages/topicDetail/topicDetail.wxml index 854b197..bac6cd1 100644 --- a/epdc-resident-mp-yushan/subpages/property/pages/topicDetail/topicDetail.wxml +++ b/epdc-resident-mp-yushan/subpages/property/pages/topicDetail/topicDetail.wxml @@ -26,12 +26,11 @@ - + - diff --git a/epdc-resident-mp-yushan/subpages/property/pages/topicList/topicList.js b/epdc-resident-mp-yushan/subpages/property/pages/topicList/topicList.js index 3d4fe4d..c9175f4 100644 --- a/epdc-resident-mp-yushan/subpages/property/pages/topicList/topicList.js +++ b/epdc-resident-mp-yushan/subpages/property/pages/topicList/topicList.js @@ -56,7 +56,7 @@ Page({ // 跳转 群详情 naavigateToSettings () { wx.navigateTo({ - url: `/subpages/association/pages/associationDetail/associationDetail?groupId=${this.data.groupId}` + url: `/subpages/property/pages/associationDetail/associationDetail?groupId=${this.data.groupId}` }) }, // 跳转 发布话题 @@ -76,7 +76,7 @@ Page({ return false } wx.navigateTo({ - url: `/subpages/association/pages/addTopic/addTopic?groupId=${this.data.groupId}&groupName=${this.data.groupName}` + url: `/subpages/property/pages/addTopic/addTopic?groupId=${this.data.groupId}&groupName=${this.data.groupName}` }) }, // 获取话题列表 @@ -200,7 +200,7 @@ Page({ } else { this.data.selectedTopicId = e.detail.detailid wx.navigateTo({ - url: `/subpages/association/pages/topicDetail/topicDetail?detailId=${e.detail.detailid}` + url: `/subpages/property/pages/topicDetail/topicDetail?detailId=${e.detail.detailid}` }) } }, diff --git a/epdc-resident-mp-yushan/subpages/property/utils/api.js b/epdc-resident-mp-yushan/subpages/property/utils/api.js index cae0478..34cf7c8 100644 --- a/epdc-resident-mp-yushan/subpages/property/utils/api.js +++ b/epdc-resident-mp-yushan/subpages/property/utils/api.js @@ -204,11 +204,4 @@ export function publishStatement ({ attitude, commentId, topicId }) { gridId, inviteUserId }) - } - - /** - * 获取关闭原因 - */ - export function getCloseReason (topicId) { - return request.get(`property/topic/auditRecord/${topicId}`) } \ No newline at end of file diff --git a/epdc-resident-mp-yushan/utils/api.js b/epdc-resident-mp-yushan/utils/api.js index 55be339..4398199 100644 --- a/epdc-resident-mp-yushan/utils/api.js +++ b/epdc-resident-mp-yushan/utils/api.js @@ -431,7 +431,7 @@ function getPropertyProjectDetail(propertyProjectId){ /********物业群-申请入群 ********/ function applyForGroup(groupId){ - return fly.get('property/group/applyForGroup',{ + return fly.post('property/group/applyForGroup',{ groupId:groupId }) } diff --git a/epdc-resident-mp-yushan/utils/config.js b/epdc-resident-mp-yushan/utils/config.js index 3792918..ceb1cd1 100644 --- a/epdc-resident-mp-yushan/utils/config.js +++ b/epdc-resident-mp-yushan/utils/config.js @@ -6,11 +6,11 @@ module.exports = { }; function BASEURL() { - return 'http://192.168.51.59:9094/epdc-api/api/' // 本地测试 接口地址 + // return 'http://192.168.51.59:9094/epdc-api/api/' // 本地测试 接口地址 // return 'http://10.10.10.225:9094/epdc-api/api/' // 本地测试 接口地址 // return 'https://epdc-shibei.elinkit.com.cn/epdc-api/api/' // return 'https://eug-test.elinkit.com.cn/epdc-api/api/' // 测试环境 接口地址 - // return "https://epdc-test.elinkservice.cn/epdc-api/api/" // 测试环境 ip接口地址 + return "https://epdc-test.elinkservice.cn/epdc-api/api/" // 测试环境 ip接口地址 // return "https://epdc.elinkservice.cn/epdc-api/api/" // 正式环境 接口地址 // return 'https://epdc-app.qingdaoshibei.cn/epdc-api/api/' // 电政办 正式环境 接口地址 // return 'https://epdc-shibei.elinkservice.cn/epdc-api/api/' // 电政办 正式环境 接口地址