e7d6d3c7 by simon

默认提交

1 parent f7adddd2
1 import { 1 import {
2 getBindtapData, 2 getBindtapData,
3 pxToRpx 3 pxToRpx,
4 getLastScreenHeight
4 } from '../../utils/util'; 5 } from '../../utils/util';
5 6
6 let app = getApp(); 7 let app = getApp();
...@@ -177,10 +178,15 @@ Page({ ...@@ -177,10 +178,15 @@ Page({
177 height 178 height
178 } = result; 179 } = result;
179 let vidHeight = (height / width) * 750; 180 let vidHeight = (height / width) * 750;
180 if (vidHeight < 320) { 181 if (vidHeight < 800) {
181 vidHeight = 320; 182 vidHeight = 800;
183 } else {
184 vidHeight = getLastScreenHeight(132);
182 } 185 }
183 vidHeight = pxToRpx(vidHeight); 186 console.log("vidHeight:", vidHeight);
187 // vidHeight = pxToRpx(vidHeight);
188 // let vidHeight = getLastScreenHeight(132);
189
184 this.setData({ 190 this.setData({
185 vidHeight: vidHeight, 191 vidHeight: vidHeight,
186 }); 192 });
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
32 width: 100%; 32 width: 100%;
33 margin: 0 auto; 33 margin: 0 auto;
34 // padding: 10px; 34 // padding: 10px;
35 max-height: 800px; 35 // max-height: 800px;
36 36
37 .vid { 37 .vid {
38 text-align: center; 38 text-align: center;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
6 <view class="content"> 6 <view class="content">
7 <!-- 视频详情 --> 7 <!-- 视频详情 -->
8 <view class="detail"> 8 <view class="detail">
9 <view class="vid-wrap" style='height: {{vidHeight}}px;'> 9 <view class="vid-wrap" style='height: {{vidHeight}}rpx;'>
10 <video wx:if="{{!isVideoEnded}}" id="vid" bindended="onVideoEndedHandler" objectFit="contain" class="vid" poster="{{detailData.thumbnail}}" src="{{detailData.videoUrl}}" /> 10 <video wx:if="{{!isVideoEnded}}" id="vid" bindended="onVideoEndedHandler" objectFit="contain" class="vid" poster="{{detailData.thumbnail}}" src="{{detailData.videoUrl}}" />
11 <view wx:else class="btn-wrap"> 11 <view wx:else class="btn-wrap">
12 <button bindtap="onReplayHandler" class="btn"> 12 <button bindtap="onReplayHandler" class="btn">
......