e7d6d3c7 by simon

默认提交

1 parent f7adddd2
import {
getBindtapData,
pxToRpx
pxToRpx,
getLastScreenHeight
} from '../../utils/util';
let app = getApp();
......@@ -177,10 +178,15 @@ Page({
height
} = result;
let vidHeight = (height / width) * 750;
if (vidHeight < 320) {
vidHeight = 320;
if (vidHeight < 800) {
vidHeight = 800;
} else {
vidHeight = getLastScreenHeight(132);
}
vidHeight = pxToRpx(vidHeight);
console.log("vidHeight:", vidHeight);
// vidHeight = pxToRpx(vidHeight);
// let vidHeight = getLastScreenHeight(132);
this.setData({
vidHeight: vidHeight,
});
......
......@@ -32,7 +32,7 @@
width: 100%;
margin: 0 auto;
// padding: 10px;
max-height: 800px;
// max-height: 800px;
.vid {
text-align: center;
......
......@@ -6,7 +6,7 @@
<view class="content">
<!-- 视频详情 -->
<view class="detail">
<view class="vid-wrap" style='height: {{vidHeight}}px;'>
<view class="vid-wrap" style='height: {{vidHeight}}rpx;'>
<video wx:if="{{!isVideoEnded}}" id="vid" bindended="onVideoEndedHandler" objectFit="contain" class="vid" poster="{{detailData.thumbnail}}" src="{{detailData.videoUrl}}" />
<view wx:else class="btn-wrap">
<button bindtap="onReplayHandler" class="btn">
......