推荐视频优化

This commit is contained in:
GaoHao
2024-12-31 10:02:39 +08:00
parent 1c54f71329
commit 731ba1a434
2 changed files with 8 additions and 3 deletions

View File

@@ -187,7 +187,6 @@
})
this.page = 1
this.randomNum = Math.floor(Math.random() * 33);
console.log("getDataList1")
if(this.scrollTimer != null){
clearTimeout(this.scrollTimer);
}

View File

@@ -204,7 +204,8 @@
timerCon: null,
randomNum: 0,
playFlag: false,
// 延时器对象
scrollTimer : null,
};
},
computed: {
@@ -264,7 +265,12 @@
}
this.page = 1
this.randomNum = Math.floor(Math.random() * 33);
this.getDataList()
if(this.scrollTimer != null){
clearTimeout(this.scrollTimer);
}
this.scrollTimer = setTimeout(()=>{
this.getDataList()
}, 1000)
},
onHide() {