From cda81e6e9730821b0f6fdb5e36906fef2dbf064d Mon Sep 17 00:00:00 2001 From: zhaoyongnian <541231643@qq.com> Date: Thu, 10 Sep 2020 15:48:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=BB=9A=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E5=8F=AA=E6=9B=B4=E6=94=B9=E5=B7=A6=E9=82=BB=E5=8F=B3=E8=88=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/replyOrRemark/replyOrRemark.js | 53 +++++-------------- 1 file changed, 12 insertions(+), 41 deletions(-) diff --git a/epdc-resident-mp-yushan/subpages/property/pages/replyOrRemark/replyOrRemark.js b/epdc-resident-mp-yushan/subpages/property/pages/replyOrRemark/replyOrRemark.js index 517e8d1..77ecf34 100644 --- a/epdc-resident-mp-yushan/subpages/property/pages/replyOrRemark/replyOrRemark.js +++ b/epdc-resident-mp-yushan/subpages/property/pages/replyOrRemark/replyOrRemark.js @@ -1,6 +1,4 @@ -import { // remarkOrReply, - topicCom, - topicReply } from '../../utils/api' +import { remarkOrReply } from '../../utils/api' Page({ data: { @@ -46,44 +44,17 @@ Page({ wx.showLoading({ title: '加载中' }) - if (this.data.faCommentId.length > 0) { // 对评论进行回复 - topicReply(para).then(res => { - wx.hideLoading() - console.log("回复", res) - wx.showToast({ - title: "评论成功", - icon: "none", - duration: 2000 - }) - wx.navigateBack() - }).catch(err => { - console.log(err) - }) - }else{ - topicCom(para).then(res => { - wx.hideLoading() - console.log("评论", res) - wx.showToast({ - title: "评论成功", - icon: "none", - duration: 2000 - }) - wx.navigateBack() - }).catch(err => { - console.log(err) + remarkOrReply(para).then(res => { + wx.hideLoading() + console.log('评论或者回复', res) + wx.showToast({ + title: '评论成功', + icon: 'none', + duration: 2000 }) - } - // remarkOrReply(para).then(res => { - // wx.hideLoading() - // console.log('评论或者回复', res) - // wx.showToast({ - // title: '评论成功', - // icon: 'none', - // duration: 2000 - // }) - // wx.navigateBack() - // }).catch(err => { - // console.log(err) - // }) + wx.navigateBack() + }).catch(err => { + console.log(err) + }) } }) \ No newline at end of file