Commit 547db4d3 authored by jyx's avatar jyx

代码优化

parent 48db78d4
......@@ -63,7 +63,7 @@
mixins: [common],
data() {
return {
controls: true, // 控制按钮
controls: false, // 控制按钮
originList: [], // 源数据
displaySwiperList: [], // swiper需要的数据
displayIndex: 0, // 用于显示swiper的真正的下标数值只有:0,1,2。
......@@ -74,7 +74,6 @@
oid: 0,
isplay: true, // 是否自动播放下一个视频
playCount: 2, // 剩余多少视频加载视频列表
issp: false,
isqp: false, // 是否全屏
urls: "https://xjc.demo.hongcd.com/api/video/videoRecommend?page=1&uid=0",
isFirstLoad: true,
......@@ -148,7 +147,9 @@
});
},
tapVideoHover() {
this.isqp = !this.issp
if (this.controls) return
this.isqp = true
this.controls = true
},
ended() {
// 1.播放当前视频结束时触发,自动切换下一个视频
......@@ -226,12 +227,13 @@
this.oid = this.originIndex + 1
this.initSwiperData(this.originIndex);
}
this.issp = false
this.controls = false
this.isqp = false
},
controlstoggle(e) {
console.log(e.detail.show);
this.issp = e.detail.show
if (!this.controls) return
this.isqp = e.detail.show
},
detail(detail) {
navigateTo(`/pagesC/video/videoDetail?data=` + encodeURIComponent(JSON.stringify(detail)) +
......
......@@ -163,7 +163,7 @@
strShareImageUrl: ""
},
fenji: 1,
controls: true,
controls: false,
originList: [], // 源数据
displaySwiperList: [], // swiper需要的数据
displayIndex: 0, // 用于显示swiper的真正的下标数值只有:0,1,2。
......@@ -174,7 +174,6 @@
oid: 0,
isplay: true, //是否自动播放下一个视频
duration: 500,
issp: false,
isqp: false,
mid: 0,
safeArea: 0,
......@@ -265,7 +264,9 @@
this.$refs.select.open('bottom');
},
tapVides() {
this.isqp = !this.issp
if (this.controls) return
this.isqp = true
this.controls = true
},
getData() {
this.originList = []
......@@ -374,8 +375,9 @@
console.log('---', this.originIndex)
this.oid = this.originIndex + 1
this.initSwiperData(this.originIndex);
}
this.issp = false
}
this.controls = false
this.isqp = false
},
initEpisode() {
......@@ -398,8 +400,8 @@
this.tabIndex = event.index;
},
controlstoggle(e) {
console.log(e.detail.show);
this.issp = e.detail.show
if (!this.controls) return
this.isqp = e.detail.show
},
collect(vedioId, index) {
this.data.collect = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment