Commit 547db4d3 authored by jyx's avatar jyx

代码优化

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