|
@@ -414,6 +414,8 @@ Page({
|
|
|
temp.plays = item.userRead.playAmount ? item.userRead.playAmount : 0;
|
|
|
temp.likes = item.userRead.likeAmount ? item.userRead.likeAmount : 0;
|
|
|
temp.commentAmount = item.userRead.commentAmount ? item.userRead.commentAmount : 0;
|
|
|
+ temp.shareAmount = item.userRead.shareAmount;
|
|
|
+ temp.favoritesAmount = item.userRead.favoritesAmount;
|
|
|
temp.classId = item.userRead.exampleId ? item.userRead.exampleId : 1605097720036046;
|
|
|
temp.time = formatDate(item.userRead.gmtCreated, 3);
|
|
|
temp.avatar = item.user.avatar;
|
|
@@ -660,6 +662,8 @@ Page({
|
|
|
temp.plays = item.userRead.playAmount ? item.userRead.playAmount : 0;
|
|
|
temp.likes = item.userRead.likeAmount ? item.userRead.likeAmount : 0;
|
|
|
temp.commentAmount = item.userRead.commentAmount ? item.userRead.commentAmount : 0;
|
|
|
+ temp.shareAmount = item.userRead.shareAmount;
|
|
|
+ temp.favoritesAmount = item.userRead.favoritesAmount;
|
|
|
temp.classId = item.userRead.exampleId ? item.userRead.exampleId : 1605097720036046;
|
|
|
temp.time = formatDate(item.userRead.gmtCreated, 3);
|
|
|
temp.avatar = item.user.avatar;
|
|
@@ -696,6 +700,15 @@ Page({
|
|
|
commentTap: function (e) {
|
|
|
console.log('点击评论区', e)
|
|
|
if (e.target.dataset.type === 'blank') {
|
|
|
+ if (this.data.commentShow && this.data.commentId) {
|
|
|
+ httpRequestApi.getClassDetail(this.data.commentId).success(res => {
|
|
|
+ console.log('评论回显', res.data.data.userRead.commentAmount)
|
|
|
+ let str = `videoList[${this.data.commentIndex}].commentAmount`;
|
|
|
+ this.setData({
|
|
|
+ [str]:res.data.data.userRead.commentAmount
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
this.setData({
|
|
|
commentShow: false
|
|
|
})
|
|
@@ -708,9 +721,11 @@ Page({
|
|
|
openComment: function (e) {
|
|
|
//
|
|
|
console.log('id', e.detail.activeId)
|
|
|
+ console.log('id', e)
|
|
|
this.setData({
|
|
|
commentShow: !this.data.commentShow,
|
|
|
commentId: e.detail.activeId,
|
|
|
+ commentIndex: e.detail.activeIndex
|
|
|
// commentList: []
|
|
|
});
|
|
|
// this.getReply(e.detail.activeId);
|
|
@@ -790,7 +805,8 @@ Page({
|
|
|
this.setData({
|
|
|
shareTitle: e.detail.currentTarget.dataset.title,
|
|
|
shareId: e.detail.currentTarget.dataset.id,
|
|
|
- shareImg: e.detail.currentTarget.dataset.shareimg
|
|
|
+ shareImg: e.detail.currentTarget.dataset.shareimg,
|
|
|
+ goToShare: true
|
|
|
})
|
|
|
},
|
|
|
// 修改年级
|
|
@@ -961,11 +977,13 @@ Page({
|
|
|
}
|
|
|
},
|
|
|
collectTap: function (e) {
|
|
|
- console.log('点击收藏首页', e)
|
|
|
const index = e.detail.index;
|
|
|
- let str = `videoList[${index}].isFavorite`
|
|
|
+ let str = `videoList[${index}].isFavorite`;
|
|
|
+ let str2 = `videoList[${index}].favoritesAmount`;
|
|
|
+ let favoritesAmount = e.detail.isCollect ? this.data.videoList[index].favoritesAmount + 1 : this.data.videoList[index].favoritesAmount - 1
|
|
|
this.setData({
|
|
|
- [str]: e.detail.isCollect
|
|
|
+ [str]: e.detail.isCollect,
|
|
|
+ [str2]: favoritesAmount
|
|
|
})
|
|
|
},
|
|
|
likeTap: function (e) {
|
|
@@ -984,4 +1002,7 @@ Page({
|
|
|
console.log('this.flower', this.flowerBox)
|
|
|
this.flowerBox.comeOut();
|
|
|
},
|
|
|
+ addShareAmount: function (e) {
|
|
|
+ console.log('+++++1', e)
|
|
|
+ }
|
|
|
})
|