未修复

This commit is contained in:
@fawn-nine
2024-08-13 17:02:53 +08:00
parent 80bef54e47
commit 9f0845f97d
5 changed files with 6275 additions and 166 deletions

View File

@@ -16,8 +16,11 @@
<common-video
@changeScreen="changeScreen"
@changeScreenLoading="changeScreenLoading"
@hideNextVideo="hideNextVideo"
@startNextVideoCountDown = "startNextVideoCountDown"
v-if="isfresh"
ref="commonVideo"
:secondCountDown="secondCountDown"
 :videoTitle="curriculumData.title"
:currentVideo="currentVideo"
:noRecored = "noRecored"
@@ -119,6 +122,8 @@ export default {
isfresh: false,
currentCateIndex: 0,
currentVideo: {},
secondCountDown:10,
countDownTimer:undefined,
videoList: {},
isOpenMp3: false,
praise: "",
@@ -206,22 +211,13 @@ export default {
},
beforeDestroy(){
console.log('页面卸载')
// this.$nextTick(()=>{
// this.$refs.commonVideo.handleEnd();
// })
this.hideNextVideo()
},
onUnload(){
// console.log('页面卸载')
// // this.$nextTick(()=>{
// this.$refs.commonVideo.handleEnd();
// // })
onUnload(){
},
onHide() {
// this.hideNextVideo()
// this.showSearchList = false
// this.searchList = []
},
@@ -232,7 +228,33 @@ export default {
...mapState(["userInfo"]),
},
methods: {
// 放大图片
startNextVideoCountDown(){
this.secondCountDown = 10
let that = this
if(this.countDownTimer){
clearInterval(this.countDownTimer)
}
this.countDownTimer = setInterval(()=>{
this.secondCountDown -= 1
if(this.secondCountDown == 0){
// clearInterval(this.countDownTimer)
// console.log('倒计时结束');
that.hideNextVideo()
console.log('切换之前的播放index是',this.currentCateIndex);
// console.log('当前的播放列表',this.videoArray.length);
// if(this.currentCateIndex < this.videoArray.length-1){
this.currentCateIndex++
console.log('切换之后的播放index是',this.currentCateIndex);
that.changeVideo(this.videoArray[this.currentCateIndex])
// }
}
},1000)
},
hideNextVideo(){
console.log('父组件收到了取消加载-------------------');
clearInterval(this.countDownTimer)
this.countDownTimer = undefined
},
//课程详情
async gotoDetail(v, index) {
@@ -279,9 +301,16 @@ export default {
});
},
changeVideo(data) {
console.log("点击了点击了切换视频-----:", data);
if(this.countDownTimer){
this.hideNextVideo()
}
console.log("点击了点击了切换视频-----:", this.countDownTimer,data, );
if (data.id != this.currentVideo.id) {
this.currentCateIndex = this.videoArray.findIndex(item => {
return item.id == data.id
})
// handleEnd
// this.$refs.commonVideo.handleEnd();
setTimeout(() => {