|
@@ -418,7 +418,8 @@ Page({
|
|
|
temp.tagUrl = item.userRead.tag ? item.userRead.tag === 'HOT' ? '../../static/index/hot_tag.png' : '../../static/index/new_tag.png' : ''
|
|
|
temp.status = item.userRead.status;
|
|
|
temp.coverImg = item.userRead.coverImg;
|
|
|
- temp.grade=item.userRead.grade
|
|
|
+ temp.shareImg = item.userRead.shareImg;
|
|
|
+ temp.grade = item.userRead.grade;
|
|
|
temp.videoShow = false;
|
|
|
this.data.videoList.push(temp);
|
|
|
|
|
@@ -630,7 +631,7 @@ Page({
|
|
|
const myList = res.data.data;
|
|
|
if (myList.length === 0) {
|
|
|
this.setData({
|
|
|
- videoList:[]
|
|
|
+ videoList: []
|
|
|
})
|
|
|
return
|
|
|
}
|
|
@@ -661,9 +662,10 @@ Page({
|
|
|
temp.status = item.userRead.status;
|
|
|
temp.ifCheck = item.userRead.status === 'CHECK' ? true : false;
|
|
|
temp.coverImg = item.userRead.coverImg;
|
|
|
- temp.grade=item.userRead.grade
|
|
|
+ temp.grade = item.userRead.grade
|
|
|
temp.isFans = true;
|
|
|
temp.videoShow = false;
|
|
|
+ temp.shareImg = item.userRead.shareImg;
|
|
|
myWorks.push(temp);
|
|
|
});
|
|
|
console.log('myWorks', myWorks)
|
|
@@ -762,7 +764,7 @@ Page({
|
|
|
return {
|
|
|
title: '请欣赏我的课文朗读作品,点赞+评论。',
|
|
|
path: `/pages/index/index?readId=${this.data.shareId}`,
|
|
|
- imageUrl: '../../static/index/share_icon.png'
|
|
|
+ imageUrl: this.data.shareImg
|
|
|
|
|
|
}
|
|
|
} else {
|
|
@@ -773,11 +775,11 @@ Page({
|
|
|
}
|
|
|
},
|
|
|
openShare: function (e) {
|
|
|
- console.log('用户点击分享按钮', e)
|
|
|
+ console.log('用户点击分享按钮123', e)
|
|
|
this.setData({
|
|
|
shareTitle: e.detail.currentTarget.dataset.title,
|
|
|
shareId: e.detail.currentTarget.dataset.id,
|
|
|
- shareImg: e.detail.currentTarget.dataset.img
|
|
|
+ shareImg: e.detail.currentTarget.dataset.shareimg
|
|
|
})
|
|
|
},
|
|
|
|
|
@@ -909,27 +911,30 @@ Page({
|
|
|
}
|
|
|
|
|
|
this.setData({
|
|
|
- noScroll: 'noScroll'
|
|
|
+ noScroll: 'noScroll',
|
|
|
+ shareTitle: obj.title,
|
|
|
+ shareId: obj.id,
|
|
|
+ shareImg: obj.shareimg
|
|
|
})
|
|
|
this.shareDialog.share(data);
|
|
|
}
|
|
|
},
|
|
|
- collectTap: function(e){
|
|
|
- console.log('点击收藏首页',e)
|
|
|
+ collectTap: function (e) {
|
|
|
+ console.log('点击收藏首页', e)
|
|
|
const index = e.detail.index;
|
|
|
let str = `videoList[${index}].isFavorite`
|
|
|
this.setData({
|
|
|
- [str]: e.detail.isCollect
|
|
|
+ [str]: e.detail.isCollect
|
|
|
})
|
|
|
},
|
|
|
- likeTap:function(e){
|
|
|
- console.log('点赞',e)
|
|
|
+ likeTap: function (e) {
|
|
|
+ console.log('点赞', e)
|
|
|
const index = e.detail.index;
|
|
|
let likeStr = `videoList[${index}].isLike`;
|
|
|
let likeNumStr = `videoList[${index}].likes`;
|
|
|
- this.setData({
|
|
|
- [likeStr]: true,
|
|
|
- [likeNumStr]: this.data.videoList[index].likes + 1
|
|
|
- })
|
|
|
+ this.setData({
|
|
|
+ [likeStr]: true,
|
|
|
+ [likeNumStr]: this.data.videoList[index].likes + 1
|
|
|
+ })
|
|
|
},
|
|
|
})
|