Authored by 张文文

video ui fix

@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 <order-item-info class="item-wrapper" /> 26 <order-item-info class="item-wrapper" />
27 <!-- 鉴定视频 --> 27 <!-- 鉴定视频 -->
28 <div class="video-img" v-if="orderDetail.appraiseVideoUrl" @click="() => onVideoHandler()"></div> 28 <div class="video-img" v-if="orderDetail.appraiseVideoUrl" @click="() => onVideoHandler()"></div>
29 - <div ref="videoWrapper" class="video-wrapper"> 29 + <div class="video-wrapper">
30 <VideoPlayer 30 <VideoPlayer
31 ref="videoPlayer" 31 ref="videoPlayer"
32 class="video-player" 32 class="video-player"
@@ -222,12 +222,13 @@ export default { @@ -222,12 +222,13 @@ export default {
222 } 222 }
223 223
224 .video-img { 224 .video-img {
  225 + display: block;
225 margin-top: 40px; 226 margin-top: 40px;
226 - margin-left: -15px;  
227 - width: calc(100% + 20px); 227 + width: 100%;
228 height: 378px; 228 height: 378px;
229 - background: url("~statics/image/order/video-big@3x.png"); 229 + background: url("~statics/image/order/video-big@3x.png") no-repeat;
230 background-size: cover; 230 background-size: cover;
  231 + background-position: center;
231 } 232 }
232 233
233 .video-wrapper { 234 .video-wrapper {
@@ -236,7 +237,7 @@ export default { @@ -236,7 +237,7 @@ export default {
236 237
237 .video-player { 238 .video-player {
238 display: block; 239 display: block;
239 - height: 30px; 240 + height: 40px;
240 opacity: 0; 241 opacity: 0;
241 } 242 }
242 243
@@ -122,7 +122,7 @@ export default { @@ -122,7 +122,7 @@ export default {
122 } 122 }
123 }, 123 },
124 mounted() { 124 mounted() {
125 - this.showPlayer(); 125 + // this.showPlayer();
126 }, 126 },
127 beforeDestroy() { 127 beforeDestroy() {
128 if (this.player) { 128 if (this.player) {
@@ -131,8 +131,10 @@ export default { @@ -131,8 +131,10 @@ export default {
131 }, 131 },
132 methods: { 132 methods: {
133 parentHandleclick() { 133 parentHandleclick() {
134 - this.showVideo = true; 134 + this.showPlayer();
  135 +
135 this.player.play(); 136 this.player.play();
  137 +
136 const timeId = setTimeout(() => { 138 const timeId = setTimeout(() => {
137 this.player.requestFullscreen(); 139 this.player.requestFullscreen();
138 clearTimeout(timeId); 140 clearTimeout(timeId);
@@ -143,6 +145,7 @@ export default { @@ -143,6 +145,7 @@ export default {
143 return; 145 return;
144 } 146 }
145 147
  148 + this.showVideo = true;
146 this.$nextTick(() => { 149 this.$nextTick(() => {
147 this.initPlayer(); 150 this.initPlayer();
148 }); 151 });
@@ -187,14 +190,6 @@ export default { @@ -187,14 +190,6 @@ export default {
187 this.voiceBtn.removeClass(noVioceClass); 190 this.voiceBtn.removeClass(noVioceClass);
188 } 191 }
189 }); 192 });
190 -  
191 - // setTimeout(() => {  
192 - // this.$yoho.getNetStatus({}, res => {  
193 - // if (res && +res.wifi === 1) {  
194 - // this.player.autoplay("muted");  
195 - // }  
196 - // });  
197 - // }, 1000);  
198 }, 193 },
199 getTime() { 194 getTime() {
200 return new Date().getTime(); 195 return new Date().getTime();
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 @on-video="params => onVideoHandle(params)" 24 @on-video="params => onVideoHandle(params)"
25 /> 25 />
26 </div> 26 </div>
27 - <div ref="videoWrapper" class="video-wrapper"> 27 + <div class="video-wrapper">
28 <VideoPlayer 28 <VideoPlayer
29 :ref="order.orderCode" 29 :ref="order.orderCode"
30 class="video-player" 30 class="video-player"
@@ -109,15 +109,6 @@ export default { @@ -109,15 +109,6 @@ export default {
109 $video.parentHandleclick(); 109 $video.parentHandleclick();
110 } 110 }
111 } 111 }
112 - },  
113 -  
114 - mounted() {  
115 - if (this.$yoho.isAndroid) {  
116 - this.$refs.videoWrapper.forEach($vnode => {  
117 - $vnode.style.position = "absolute";  
118 - $vnode.style.top = "-1000px";  
119 - });  
120 - }  
121 } 112 }
122 }; 113 };
123 </script> 114 </script>