...
|
...
|
@@ -52,6 +52,22 @@ |
|
|
<img class="ref-img" v-lazy="prdDetailTip"/>
|
|
|
</div>
|
|
|
|
|
|
<!-- 视频资源位 -->
|
|
|
<a
|
|
|
class="banner video-resource"
|
|
|
ref="videoResourceImg"
|
|
|
v-if="videoResource.src">
|
|
|
<div
|
|
|
class="video-mask"
|
|
|
@click="onVideoPlay"></div>
|
|
|
<VideoPlayer
|
|
|
ref="videoPlayer"
|
|
|
class="video-player"
|
|
|
:source="videoResource.url"
|
|
|
/>
|
|
|
<img-size :src="sizeImg(videoResource.src)"/>
|
|
|
</a>
|
|
|
|
|
|
<img class="ref-img" v-lazy="prdDetailImage" />
|
|
|
|
|
|
<div class="recommend" v-if="recommend"><h2>相关推荐</h2>
|
...
|
...
|
@@ -118,6 +134,7 @@ export default { |
|
|
'cube-slide': Slide,
|
|
|
'cube-slide-item': Slide.Item,
|
|
|
'cube-popup': Popup,
|
|
|
VideoPlayer
|
|
|
},
|
|
|
props: {
|
|
|
productId: {
|
...
|
...
|
@@ -129,7 +146,6 @@ export default { |
|
|
slideOptions: {
|
|
|
eventPassthrough: 'vertical',
|
|
|
},
|
|
|
videoUrl: 'https://v.yohobuy.com/d3afd3b6vodtranscq1400201211/e553618a5285890795944899907/v.f30.mp4',
|
|
|
prdDetailTip,
|
|
|
prdDetailImage,
|
|
|
|
...
|
...
|
@@ -790,22 +806,46 @@ export default { |
|
|
title: `淘口令#${this.productDetail.product_name}`, // 分享标题
|
|
|
text: '' // 分享描述
|
|
|
}, yasReportHandler);
|
|
|
},
|
|
|
onVideoPlay() {
|
|
|
this.$refs.videoPlayer.parentHandleclick()
|
|
|
}
|
|
|
},
|
|
|
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@import "./product-detail";
|
|
|
|
|
|
.video-wrapper {
|
|
|
overflow: hidden;
|
|
|
.video-mask {
|
|
|
z-index: 10;
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
bottom: 0;
|
|
|
left: 0;
|
|
|
right: 0;
|
|
|
}
|
|
|
|
|
|
.video-player {
|
|
|
display: block;
|
|
|
height: 40px;
|
|
|
height: 100%;
|
|
|
width: 100%;
|
|
|
opacity: 0;
|
|
|
position: absolute;
|
|
|
bottom: 0;
|
|
|
overflow: hidden;
|
|
|
|
|
|
/deep/ .video-js {
|
|
|
padding: 0;
|
|
|
height: 100%;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.video-resource {
|
|
|
margin-top: 30px;
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
|
|
|
.cube-btn {
|
...
|
...
|
|