Authored by shuaiguo

feat(商品详情): 视频资源位非全屏播放&购买title修改

@@ -130,13 +130,14 @@ export default { @@ -130,13 +130,14 @@ export default {
130 } 130 }
131 }, 131 },
132 methods: { 132 methods: {
133 - async parentHandleclick() { 133 + async parentHandleclick({isFullScreen = true} = {}) {
134 this.player.play(); 134 this.player.play();
135 -  
136 - const timeId = setTimeout(() => {  
137 - this.player.requestFullscreen();  
138 - clearTimeout(timeId);  
139 - }); 135 + if (isFullScreen) {
  136 + const timeId = setTimeout(() => {
  137 + this.player.requestFullscreen();
  138 + clearTimeout(timeId);
  139 + });
  140 + }
140 }, 141 },
141 delay(ns) { 142 delay(ns) {
142 return new Promise(resolve => { 143 return new Promise(resolve => {
@@ -61,11 +61,12 @@ @@ -61,11 +61,12 @@
61 ref="videoResourceImg" 61 ref="videoResourceImg"
62 v-if="videoResource.src"> 62 v-if="videoResource.src">
63 <div 63 <div
  64 + v-if="!isShowVideo"
64 class="video-mask" 65 class="video-mask"
65 @click="onVideoPlay"></div> 66 @click="onVideoPlay"></div>
66 <VideoPlayer 67 <VideoPlayer
67 ref="videoPlayer" 68 ref="videoPlayer"
68 - class="video-player" 69 + :class="isShowVideo ? 'video-player' : 'video-player video-player-opacity'"
69 :source="videoResource.url" 70 :source="videoResource.url"
70 /> 71 />
71 <img-size :src="sizeImg(videoResource.src)"/> 72 <img-size :src="sizeImg(videoResource.src)"/>
@@ -187,6 +188,7 @@ export default { @@ -187,6 +188,7 @@ export default {
187 }, 188 },
188 recommendYasIndex: 0, // 推荐商品爆光顺序 189 recommendYasIndex: 0, // 推荐商品爆光顺序
189 articleData: {}, // 9宫格推荐文章 190 articleData: {}, // 9宫格推荐文章
  191 + isShowVideo: false
190 }; 192 };
191 }, 193 },
192 computed: { 194 computed: {
@@ -666,7 +668,7 @@ export default { @@ -666,7 +668,7 @@ export default {
666 dest: 'OrderBuyConfirm', 668 dest: 'OrderBuyConfirm',
667 type: 'buy', 669 type: 'buy',
668 title: '购买', 670 title: '购买',
669 - btnTitle: '现货' 671 + btnTitle: '全新现货'
670 }; 672 };
671 this.showSizeSelectSheet = true; 673 this.showSizeSelectSheet = true;
672 }, 674 },
@@ -967,7 +969,8 @@ export default { @@ -967,7 +969,8 @@ export default {
967 }, yasReportHandler); 969 }, yasReportHandler);
968 }, 970 },
969 onVideoPlay() { 971 onVideoPlay() {
970 - this.$refs.videoPlayer.parentHandleclick(); 972 + this.isShowVideo = true;
  973 + this.$refs.videoPlayer.parentHandleclick({isFullScreen: false});
971 974
972 const {url, template_id, template_name} = this.videoResource; 975 const {url, template_id, template_name} = this.videoResource;
973 let param = { 976 let param = {
@@ -1011,7 +1014,6 @@ export default { @@ -1011,7 +1014,6 @@ export default {
1011 display: block; 1014 display: block;
1012 height: 100%; 1015 height: 100%;
1013 width: 100%; 1016 width: 100%;
1014 - opacity: 0;  
1015 position: absolute; 1017 position: absolute;
1016 bottom: 0; 1018 bottom: 0;
1017 overflow: hidden; 1019 overflow: hidden;
@@ -1022,6 +1024,10 @@ export default { @@ -1022,6 +1024,10 @@ export default {
1022 } 1024 }
1023 } 1025 }
1024 1026
  1027 + .video-player-opacity {
  1028 + opacity: 0;
  1029 + }
  1030 +
1025 .video-resource { 1031 .video-resource {
1026 margin-top: 30px; 1032 margin-top: 30px;
1027 position: relative; 1033 position: relative;