diff --git a/pages/topics/reportDemand/index.js b/pages/topics/reportDemand/index.js index 20e5c71..2e6e455 100644 --- a/pages/topics/reportDemand/index.js +++ b/pages/topics/reportDemand/index.js @@ -314,48 +314,48 @@ Page({ name: this.data.username } console.log('报需求-->',data) - // topicModel.addTalents(data, res => { - // const id = res.result; - // if (res.code === 200) { - // this.setData({ - // messageDetail: '', - // streetID: '', - // typeCode: '', - // files: [], - // }, () => { - // wx.showModal({ - // title: '提交成功', - // content: '问题已收到!', - // cancelText: '知道了', - // confirmText: '查看进度', - // success(res) { - // if (res.confirm) { - // wx.redirectTo({ - // url: '/pages/user/myWhistle/whistleDetail/index?id=' + id, - // }) - // } else if (res.cancel) { // 点击知道了 - // if (th.properties.type == '') { - // setTimeout(function () { - // th.setData({ - // textareaValue: '' - // }) - // }, 500); - // } else { - // console.log(1212); - // wx.navigateBack({ - // delta: 1 - // }) - // } - // } - // } - // }) - // }) - // } - // }) - // this.setData({ - // streetsIndex: 0, - // typeListIndex: 0, - // }) + topicModel.addTalents(data, res => { + const id = res.result; + if (res.code === 200) { + this.setData({ + messageDetail: '', + streetID: '', + typeCode: '', + files: [], + }, () => { + wx.showModal({ + title: '提交成功', + content: '问题已收到!', + cancelText: '知道了', + confirmText: '查看进度', + success(res) { + if (res.confirm) { + wx.redirectTo({ + url: '/pages/user/myWhistle/whistleDetail/index?id=' + id, + }) + } else if (res.cancel) { // 点击知道了 + if (th.properties.type == '') { + setTimeout(function () { + th.setData({ + textareaValue: '' + }) + }, 500); + } else { + console.log(1212); + wx.navigateBack({ + delta: 1 + }) + } + } + } + }) + }) + } + }) + this.setData({ + streetsIndex: 0, + typeListIndex: 0, + }) }, company: function (e) { var company = e.detail.value;