|
@@ -40,6 +40,7 @@ Component({
|
|
|
}
|
|
|
this.setData({
|
|
|
videoInfoCopy: newVal,
|
|
|
+ videoPath: newVal.userRead.videoPath,
|
|
|
isOfficial: newVal.userRead.type != 'APP_EXAMPLE'
|
|
|
})
|
|
|
}
|
|
@@ -64,6 +65,10 @@ Component({
|
|
|
data: {
|
|
|
selfUid: wx.getStorageSync('uid'),
|
|
|
videoInfoCopy: {},
|
|
|
+ videoPath: '',
|
|
|
+ //userRead.videoPath 和 example.videoPath,
|
|
|
+ workType: 'videoPath',
|
|
|
+ // 是否官方作品
|
|
|
isOfficial: false
|
|
|
},
|
|
|
lifetimes: {
|
|
@@ -85,6 +90,7 @@ Component({
|
|
|
this.triggerEvent('playVideo', this.data.videoInfoCopy.userRead.id)
|
|
|
this.submitPlayLog(this.data.videoInfoCopy.userRead.id)
|
|
|
},
|
|
|
+ // 设置进度条
|
|
|
slider({
|
|
|
detail
|
|
|
}) {
|
|
@@ -229,6 +235,16 @@ Component({
|
|
|
})
|
|
|
this.triggerEvent('setListFans', this.data.videoInfoCopy.user.uid)
|
|
|
},
|
|
|
+ jumpUserInfo() {
|
|
|
+ wx.navigateTo({
|
|
|
+ url: `/pages/personal/index?uid=${this.data.videoInfoCopy.user.uid}&type=user`,
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 控制音频播放
|
|
|
+ audioPlay() {
|
|
|
+ this.triggerEvent('playAudio')
|
|
|
+ this.submitPlayLog(this.data.videoInfoCopy.userRead.id)
|
|
|
+ },
|
|
|
toPkPage() {
|
|
|
let videoInfo = this.data.videoInfoCopy
|
|
|
if (this.properties.videoType == 'pk') {
|
|
@@ -265,15 +281,12 @@ Component({
|
|
|
url
|
|
|
})
|
|
|
},
|
|
|
- jumpUserInfo() {
|
|
|
- wx.navigateTo({
|
|
|
- url: `/pages/personal/index?uid=${this.data.videoInfoCopy.user.uid}&type=user`,
|
|
|
+ // pkPage页面控制播放按钮
|
|
|
+ changeRead() {
|
|
|
+ this.setData({
|
|
|
+ workType: this.data.workType == 'videoPath' ? 'example' : 'videoPath',
|
|
|
})
|
|
|
- },
|
|
|
- // 控制音频播放
|
|
|
- audioPlay() {
|
|
|
- this.triggerEvent('playAudio')
|
|
|
- this.submitPlayLog(this.data.videoInfoCopy.userRead.id)
|
|
|
+ console.log(this.data.workType);
|
|
|
},
|
|
|
// 统计作品播放次数
|
|
|
async submitPlayLog(userReadId) {
|