From cf6dae97e752c6e39abbae32ad7571ce22b6905f Mon Sep 17 00:00:00 2001 From: chenteng <17864191895@163.com> Date: Fri, 7 Aug 2020 15:35:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E4=BA=92=E5=8A=A8=20=E8=AF=84=E8=AE=BA=E5=8F=8C=E5=87=BB=20?= =?UTF-8?q?=E4=B8=A4=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../topics/interactive/topicArticle/index.js | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/pages/topics/interactive/topicArticle/index.js b/pages/topics/interactive/topicArticle/index.js index f99d49f..7a499b4 100644 --- a/pages/topics/interactive/topicArticle/index.js +++ b/pages/topics/interactive/topicArticle/index.js @@ -36,7 +36,8 @@ Page({ startX: 0, //开始坐标 startY: 0, - total:0 + total:0, + confirmTag:true }, /** @@ -229,15 +230,18 @@ Page({ }, // 弹出框 确认 confirm: function () { - - if (!this.data.currentComment){ - wx.showToast({ - title: '请输入评论', - icon: 'none' + if(this.data.confirmTag){ + this.setData({ + confirmTag:false }) - return - } - topicModel.topicAddComment(this.data.currentComment, this.data.topicId,res=>{ + if (!this.data.currentComment){ + wx.showToast({ + title: '请输入评论', + icon: 'none' + }) + return + } + topicModel.topicAddComment(this.data.currentComment, this.data.topicId,res=>{ if(res.code === 200){ this.setData({ hiddenmodalput: true, @@ -245,7 +249,12 @@ Page({ }) this.fetchDetailComment() } - }) + this.setData({ + confirmTag:true + }) + }) + } + }, // 评论输入框