diff --git a/pages/status/detail.js b/pages/status/detail.js
index 49a53eb62461701d229b8cd55ff1c5d7d2bacd0a..e2edcaf2ef803db68a7bc5f442215f8136d44f88 100644
--- a/pages/status/detail.js
+++ b/pages/status/detail.js
@@ -7,7 +7,9 @@ Page({
pageIndex:1,
pageSize:10,
status_id:0,
- user_id:app.user.SpaceUserId
+ user_id:app.user.SpaceUserId,
+ comment_id:'',
+ comment_text:''
},
onLoad:function(options){
// 页面初始化 options为页面跳转所带来的参数
@@ -48,6 +50,7 @@ Page({
formSubmit: function(e) {
var content = e.detail.value.content;
var status_id = e.detail.value.status_id;
+ var comment_id = e.detail.value.comment_id;
var that = this;
//发表闪存评论
wx.request({
@@ -55,6 +58,7 @@ Page({
method: 'post',
data: {
ReplyTo:status_id,
+ ParentCommentId:comment_id,
Content:content
},
header: {
@@ -66,6 +70,9 @@ Page({
complete: function () {
that.getStatus(that, status_id);
that.onPullDownRefresh();
+ that.setData({
+ comment_text:''
+ })
}
})
},
@@ -142,5 +149,15 @@ Page({
that.onPullDownRefresh();
}
})
+ },
+ //回复别人评论
+ replyComment:function(event) {
+ var comment_id = event.currentTarget.dataset.comment_id;
+ var comment_user_name = event.currentTarget.dataset.comment_user_name;
+
+ this.setData({
+ comment_id:comment_id,
+ comment_text:"@" + comment_user_name +":"
+ });
}
})
\ No newline at end of file
diff --git a/pages/status/detail.wxml b/pages/status/detail.wxml
index 8b24c1cf94cb3c80255d8875a6c94927982a6e39..ae0e75682f44ac1eaf05174d0788e224f94f5e80 100644
--- a/pages/status/detail.wxml
+++ b/pages/status/detail.wxml
@@ -13,9 +13,7 @@
文字来源
{{statuses.DateAdded}}
-
- 回应
-
+
@@ -34,8 +32,7 @@
{{item.DateAdded}}
删除
-
- 回应
+ 回应
@@ -47,8 +44,9 @@