Browse Source

修复 浏览互动 评论双击 两次

master
chenteng 5 years ago
parent
commit
cf6dae97e7
  1. 29
      pages/topics/interactive/topicArticle/index.js

29
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
})
})
}
},
// 评论输入框

Loading…
Cancel
Save