Browse Source

【物业服务】-【接口对应v2】 -刘绍文 -2020/05/14

feature/v2.0
liushaowen 5 years ago
parent
commit
ec22a583ef
  1. 39
      epdc-resident-mp-yushan/pages/property/property.js
  2. 2
      epdc-resident-mp-yushan/pages/property/property.wxml
  3. 2
      epdc-resident-mp-yushan/pages/property/property.wxss
  4. 8
      epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.js
  5. 8
      epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.wxml
  6. 2
      epdc-resident-mp-yushan/subpages/property/pages/joinassociation/joinassociation.js
  7. 25
      epdc-resident-mp-yushan/subpages/property/pages/topicDetail/topicDetail.js
  8. 3
      epdc-resident-mp-yushan/subpages/property/pages/topicDetail/topicDetail.wxml
  9. 6
      epdc-resident-mp-yushan/subpages/property/pages/topicList/topicList.js
  10. 7
      epdc-resident-mp-yushan/subpages/property/utils/api.js
  11. 2
      epdc-resident-mp-yushan/utils/api.js
  12. 4
      epdc-resident-mp-yushan/utils/config.js

39
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}`
})

2
epdc-resident-mp-yushan/pages/property/property.wxml

@ -45,7 +45,7 @@
<!-- <image src="../../images/property/red-join.png" class="join-button"></image> -->
<!-- <view class="join-text">加入</view> -->
<view class="join-button" data-joinStatus="{{projectInfo.groupMemberFlag}}"
data-groupName="{{projectInfo.groupName}}" data-state="{{projectInfo.groupState}}" data-groupId="{{projectInfo.id}}" bindtap="joinGroup">加入</view>
data-groupName="{{projectInfo.groupName}}" data-state="{{projectInfo.groupState}}" data-groupId="{{projectInfo.groupId}}" bindtap="joinGroup">{{projectInfo.groupMemberFlag=='0'?'加入':projectInfo.groupMemberFlag=='1'?'待审核':'进入'}}</view>
</view>
</view>
</view>

2
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;

8
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}`
})
},
// 选择图片

8
epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.wxml

@ -16,10 +16,6 @@
<text class="group-leader" wx:if="{{userInfo.nickname}}">{{userInfo.nickname}}(群主)</text>
</view>
</view>
<view class="right" wx:if="{{userInfo.lordFlag == 1 && userInfo.groupCategory != '0'}}" bindtap="disbandAssociation">
<image class="dismiss-bg" src="../../images/jiesanqun.png" />
<view class="dismiss">解散群</view>
</view>
</view>
<view class="bottom">
<view class="member">
@ -30,10 +26,6 @@
<view class="num">{{userInfo.topicNum}}</view>
<view class="title">话题</view>
</view>
<view class="member">
<view class="num">{{userInfo.changeToIssueNum}}</view>
<view class="title">已转议题</view>
</view>
</view>
</view>
</view>

2
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}`
})
},
// 获取社群详情

25
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({

3
epdc-resident-mp-yushan/subpages/property/pages/topicDetail/topicDetail.wxml

@ -26,12 +26,11 @@
<view class="bottom-operation">
<view class="altitude-input" style="width: {{lordFlag == '1' && detailInfo.topicState == '0' ? '330rpx' : '100%'}}">
<view class="altitude-input" style="width: {{lordFlag == '1' && detailInfo.topicState == '0' ? '550rpx' : '100%'}}">
<image src="../../images/ic_baidataidubianji@2x.png" />
<input disabled="{{true}}" bindtap="inputFocus" type="text" placeholder="快来表达您的态度吧" placeholder-class="placeholder-input" />
</view>
<button wx:if="{{lordFlag == '1' && detailInfo.topicState == '0'}}" class="close-topic" hover-class="hover-close" bindtap="closeDialog">关闭话题</button>
<button wx:if="{{lordFlag == '1' && detailInfo.topicState == '0'}}" bindtap="changeToIssue" class="change-issue" hover-class="hover-change">转成议题</button>
</view>
</view>

6
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}`
})
}
},

7
epdc-resident-mp-yushan/subpages/property/utils/api.js

@ -205,10 +205,3 @@ export function publishStatement ({ attitude, commentId, topicId }) {
inviteUserId
})
}
/**
* 获取关闭原因
*/
export function getCloseReason (topicId) {
return request.get(`property/topic/auditRecord/${topicId}`)
}

2
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
})
}

4
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/' // 电政办 正式环境 接口地址

Loading…
Cancel
Save