| | |
| | | class="video-item" |
| | | v-for="(item, index) in videoList" |
| | | :key="item.id" |
| | | @click="playVideo(index)" |
| | | @click="playAuthorVideo(index)" |
| | | > |
| | | <image class="video-cover" :src="item.coverUrl" mode="aspectFill"></image> |
| | | <view class="video-info"> |
| | |
| | | class="video-item" |
| | | v-for="(item, index) in collectVideoList" |
| | | :key="item.id" |
| | | @click="playVideo(index)" |
| | | @click="playCollectVideo(index)" |
| | | > |
| | | <image class="video-cover" :src="item.coverUrl" mode="aspectFill"></image> |
| | | <view class="video-info"> |
| | |
| | | getAuthorVideoPage(this.videoQuery).then(res => { |
| | | this.videoList = res.data.data |
| | | this.videoTotal = res.data.total |
| | | if(res.data.data.length < this.videoQuery.pageSize) { |
| | | this.nomoreVideo = true; |
| | | } |
| | | }) |
| | | }, |
| | | // 获取作品信息 |
| | | // 切换关注状态 |
| | | toggleFollow() { |
| | | if(this.userInfo.hasSub) { |
| | |
| | | this.collectVideoQuery.authorId = this.authorId |
| | | getAuthorCollectVideoPage(this.collectVideoQuery).then(res => { |
| | | this.collectVideoList = res.data.data |
| | | if(res.data.data.length < this.collectVideoQuery.pageSize) { |
| | | this.nomoreCollectVideo = true; |
| | | } |
| | | }) |
| | | }, |
| | | // 播放视频 |
| | | playVideo(index) { |
| | | const videoItem = this.videoList[index]; |
| | | // 播放作者视频 |
| | | playAuthorVideo(index) { |
| | | const playInfo = { |
| | | videoList: this.videoList, |
| | | nomore: this.nomoreVideo, |
| | | pageNumber: this.videoQuery.pageNumber, |
| | | playIndex: index |
| | | } |
| | | uni.setStorageSync("playInfo", playInfo) |
| | | uni.navigateTo({ |
| | | url: `/pages/video/play?id=${videoItem.id}` |
| | | url: `/pages/video/video-play?authorId=${this.authorId}&videoFrom=author` |
| | | }); |
| | | }, |
| | | |
| | | // 播放收藏视频 |
| | | playAuthorVideo(index) { |
| | | const playInfo = { |
| | | videoList: this.collectVideoList, |
| | | nomore: this.nomoreCollectVideo, |
| | | pageNumber: this.collectVideoQuery.pageNumber, |
| | | playIndex: index |
| | | } |
| | | uni.setStorageSync("playInfo", playInfo) |
| | | uni.navigateTo({ |
| | | url: `/pages/video/video-play?authorId=${this.authorId}&videoFrom=collect` |
| | | }); |
| | | }, |
| | | // 编辑个人资料 |
| | | editProfile() { |
| | | uni.navigateTo({ |