|
|
@ -36,7 +36,8 @@ Page({ |
|
|
|
|
|
|
|
|
startX: 0, //开始坐标
|
|
|
startX: 0, //开始坐标
|
|
|
startY: 0, |
|
|
startY: 0, |
|
|
total:0 |
|
|
total:0, |
|
|
|
|
|
confirmTag:true |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ -229,15 +230,18 @@ Page({ |
|
|
}, |
|
|
}, |
|
|
// 弹出框 确认
|
|
|
// 弹出框 确认
|
|
|
confirm: function () { |
|
|
confirm: function () { |
|
|
|
|
|
if(this.data.confirmTag){ |
|
|
if (!this.data.currentComment){ |
|
|
this.setData({ |
|
|
wx.showToast({ |
|
|
confirmTag:false |
|
|
title: '请输入评论', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
}) |
|
|
return |
|
|
if (!this.data.currentComment){ |
|
|
} |
|
|
wx.showToast({ |
|
|
topicModel.topicAddComment(this.data.currentComment, this.data.topicId,res=>{ |
|
|
title: '请输入评论', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
topicModel.topicAddComment(this.data.currentComment, this.data.topicId,res=>{ |
|
|
if(res.code === 200){ |
|
|
if(res.code === 200){ |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
hiddenmodalput: true, |
|
|
hiddenmodalput: true, |
|
|
@ -245,7 +249,12 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
this.fetchDetailComment() |
|
|
this.fetchDetailComment() |
|
|
} |
|
|
} |
|
|
}) |
|
|
this.setData({ |
|
|
|
|
|
confirmTag:true |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 评论输入框
|
|
|
// 评论输入框
|
|
|
|