| let that = this; | let that = this; | ||||
| if (res.status == 0) { | if (res.status == 0) { | ||||
| if (!businessCommunicationDemandId) { | if (!businessCommunicationDemandId) { | ||||
| wx.showModal({ | |||||
| wx.showLoading({ | |||||
| title: '发布成功', | title: '发布成功', | ||||
| content: "请关注平台公众号,如有咨询,可及时接收消息通知!", | |||||
| showCancel: false, | |||||
| success(res1) { | |||||
| if (res1.confirm) { | |||||
| that.clearData(); | |||||
| let listDetail = res.data; | |||||
| wx.reLaunch({ | |||||
| url: '/pages/index/components/listDetails/Details?businessCommunicationDemandId=' + listDetail.businessCommunicationDemandId, | |||||
| }) | |||||
| } | |||||
| } | |||||
| mask: true | |||||
| }) | }) | ||||
| setTimeout(() => { | |||||
| wx.hideLoading() | |||||
| let listDetail = res.data; | |||||
| wx.reLaunch({ | |||||
| url: '/pages/index/components/listDetails/Details?businessCommunicationDemandId=' + listDetail.businessCommunicationDemandId, | |||||
| }) | |||||
| }, 1000); | |||||
| // wx.showModal({ | |||||
| // title: '发布成功', | |||||
| // content: "请关注平台公众号,如有咨询,可及时接收消息通知!", | |||||
| // showCancel: false, | |||||
| // success(res1) { | |||||
| // if (res1.confirm) { | |||||
| // that.clearData(); | |||||
| // let listDetail = res.data; | |||||
| // wx.reLaunch({ | |||||
| // url: '/pages/index/components/listDetails/Details?businessCommunicationDemandId=' + listDetail.businessCommunicationDemandId, | |||||
| // }) | |||||
| // } | |||||
| // } | |||||
| // }) | |||||
| } else { | } else { | ||||
| wx.showLoading({ | wx.showLoading({ | ||||
| title: '修改成功', | title: '修改成功', | ||||
| tempListData.forEach(el => { | tempListData.forEach(el => { | ||||
| if (el.businessCommunicationDemandId == businessCommunicationDemandId) { | if (el.businessCommunicationDemandId == businessCommunicationDemandId) { | ||||
| el.info = Page.data.detailValue; | el.info = Page.data.detailValue; | ||||
| if(el.state != 0){ | |||||
| if (el.state != 0) { | |||||
| el.state = 0; | el.state = 0; | ||||
| str = 'needRefresh'; | str = 'needRefresh'; | ||||
| } | } | ||||
| } | } | ||||
| }) | }) | ||||
| prevPage.setData({ listData: tempListData ,currentTab : str})//设置数据 | |||||
| prevPage.setData({ listData: tempListData, currentTab: str })//设置数据 | |||||
| wx.navigateBack() | wx.navigateBack() | ||||
| }, 1000); | }, 1000); | ||||
| } | } |