diff --git a/components/diy/carousel.vue b/components/diy/carousel.vue
index 73d79945..8e9595b9 100644
--- a/components/diy/carousel.vue
+++ b/components/diy/carousel.vue
@@ -6,7 +6,7 @@
-
+
@@ -24,7 +24,7 @@
-
+
@@ -49,12 +49,6 @@
-
-
-
-
-
-
@@ -100,7 +94,6 @@
img_fit: '',
dot_style: '',
video_style: '',
- video_src: '',
popup_width: '0rpx',
popup_height: '0rpx',
// 样式二的处理
@@ -250,23 +243,12 @@
style += gradient_computer(data) + padding_computer(video_padding) + `color: ${video_title_color};`;
return style;
},
- video_play(list) {
- this.setData({
- video_src: list[0].url,
- });
- this.$refs.popup.open();
- const videoContext = uni.createVideoContext('carousel_video');
- if (!isEmpty(videoContext)) {
- videoContext.play();
+ video_play(e) {
+ const list = e.currentTarget.dataset.value;
+ if (!isEmpty(list)) {
+ this.$emit('video_play', list[0].url, this.popup_width, this.popup_height);
}
},
- video_close() {
- const videoContext = uni.createVideoContext('carousel_video');
- if (!isEmpty(videoContext)) {
- videoContext.pause();
- }
- this.$refs.popup.close();
- },
url_open(link) {
app.globalData.url_event(link);
},
diff --git a/components/diy/diy.vue b/components/diy/diy.vue
index b85664e4..e005b296 100644
--- a/components/diy/diy.vue
+++ b/components/diy/diy.vue
@@ -15,7 +15,7 @@
-
+
@@ -63,6 +63,12 @@
+
+
+
+
+
+
@@ -79,6 +85,7 @@