|
|
@ -153,7 +153,6 @@ Page({ |
|
|
|
fetchTopicUnCollect(){ |
|
|
|
let collectionId = this.data.collectionId |
|
|
|
topicModel.topicUnCollect(collectionId, res => { |
|
|
|
//console.log('取消收藏')
|
|
|
|
if (res.code === 200) { |
|
|
|
this.fetchDetail() |
|
|
|
wx.showToast({ |
|
|
@ -168,8 +167,19 @@ Page({ |
|
|
|
wx.showLoading() |
|
|
|
topicModel.topicCommentPraise(commentId,res =>{ |
|
|
|
if (res.code === 200) { |
|
|
|
wx.hideLoading() |
|
|
|
this.fetchDetailComment() |
|
|
|
wx.hideLoading(); |
|
|
|
var list = this.data.commentList; |
|
|
|
|
|
|
|
for(var index in list){ |
|
|
|
if(list[index]['id'] == res.result.id){ |
|
|
|
list[index]['praiseNum'] = res.result.supportNum; |
|
|
|
list[index]['isSupport'] = res.result.isSupport; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
commentList:list |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|