|
@@ -7,8 +7,8 @@ Page({
|
|
|
class1: 'commentItem commentItemFirst',
|
|
|
classNormal: 'commentItem',
|
|
|
postId: '',
|
|
|
- comment: []
|
|
|
-
|
|
|
+ comment: [],
|
|
|
+ replyInfo: ''
|
|
|
},
|
|
|
onLoad: function (option) {
|
|
|
console.log(option)
|
|
@@ -22,6 +22,27 @@ Page({
|
|
|
this.uid = wx.getStorageSync('uid');
|
|
|
this.getReplyDetail();
|
|
|
},
|
|
|
+ // 保存 回复的内容
|
|
|
+ saveValue: function(e){
|
|
|
+ this.setData({
|
|
|
+ replyInfo: e.detail.value
|
|
|
+ },() => {
|
|
|
+ console.log(this.data.replyInfo);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ replyDone:function(){
|
|
|
+ const data = {
|
|
|
+ postsId: this.data.postId,
|
|
|
+ content: this.data.replyInfo
|
|
|
+ }
|
|
|
+
|
|
|
+ httpRequestApi.postReplyComment(this.uid, data).success(res => {
|
|
|
+ this.setData({
|
|
|
+ replyModal: false
|
|
|
+ });
|
|
|
+ this.getReplyDetail();//更新 变化后的 replyTemp。
|
|
|
+ });
|
|
|
+ },
|
|
|
// 查询回复详情
|
|
|
getReplyDetail: function () {
|
|
|
// let uid = wx.getStorageSync('uid');
|