Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
home-with-kids-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
e7d6d3c7
authored
2019-12-16 19:29:18 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
f7adddd2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
src/pages/detail/detail.js
src/pages/detail/detail.scss
src/pages/detail/detail.wxml
src/pages/detail/detail.js
View file @
e7d6d3c
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
,
});
...
...
src/pages/detail/detail.scss
View file @
e7d6d3c
...
...
@@ -32,7 +32,7 @@
width
:
100%
;
margin
:
0
auto
;
// padding: 10px;
max-height
:
800px
;
//
max-height: 800px;
.vid
{
text-align
:
center
;
...
...
src/pages/detail/detail.wxml
View file @
e7d6d3c
...
...
@@ -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}}
r
px;'>
<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">
...
...
Please
register
or
sign in
to post a comment