顶部固定

main
king 1 year ago
parent 8180bffb43
commit 6e696ecd50
  1. 43
      src/pages/home/home.module.scss
  2. 38
      src/pages/index/index.module.scss
  3. 22
      src/pages/preview/videoFull/videoFull.tsx

@ -1,3 +1,44 @@
.header {
font-weight: bold;
font-size: 34rpx;
position: fixed;
width: 100%;
left: 0;
top: 0;
overflow: hidden;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: flex-end;
&:after {
min-height: 100vh;
position: absolute;
top: 0;
left: -10%;
width: 120%;
content: '';
display: block;
background: linear-gradient(40deg, #fff 50rpx, #caf0e2, #92ecc5) no-repeat;
min-height: 100vh;
background-size: 100% 600rpx;
z-index: -1;
}
}
.tipsLogin {
padding: 24rpx;
color: #fff;
align-items: center;
position: fixed;
bottom: 0;
left: 0;
display: flex;
justify-content: space-between;
width: 100%;
box-sizing: border-box;
background: rgba(#000, .7);
}
.content { .content {
@ -26,7 +67,6 @@
.search { .search {
width: 710rpx; width: 710rpx;
margin: 40rpx 0 0;
background: #fff; background: #fff;
border-radius: 100px; border-radius: 100px;
line-height: 68rpx; line-height: 68rpx;
@ -35,6 +75,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-top: 40rpx;
} }
.adware { .adware {

@ -1,28 +1,3 @@
.header {
text-align: center;
font-weight: bold;
font-size: 34rpx;
position: fixed;
width: 100%;
left: 0;
top: 0;
height: 70rpx;
overflow: hidden;
&:after {
min-height: 100vh;
position: absolute;
top: 0;
left: -10%;
width: 120%;
content: '';
display: block;
background: linear-gradient(40deg, #fff 50rpx, #caf0e2, #92ecc5) no-repeat;
min-height: 100vh;
background-size: 100% 600rpx;
z-index: -1;
}
}
.content { .content {
position: relative; position: relative;
@ -53,16 +28,3 @@
border-radius: 20px; border-radius: 20px;
} }
.tipsLogin {
padding: 24rpx;
color: #fff;
align-items: center;
position: fixed;
bottom: 0;
left: 0;
display: flex;
justify-content: space-between;
width: 100%;
box-sizing: border-box;
background: rgba(#000, .7);
}

@ -9,18 +9,30 @@ interface Props {
const VideoFull: FC<Props> = () => { const VideoFull: FC<Props> = () => {
const {url} = Taro.useRouter().params const {url} = Taro.useRouter().params
Taro.useLoad(() => {
if (!url) {
Taro.showModal({
title: '播放地址错',
success(){
Taro.navigateBack()
}
})
}
})
return ( return (
<Video <Video
className={styles.video} className={styles.video}
controls
src={url!} src={url!}
autoplay autoplay
loop showCenterPlayBtn
showFullscreenBtn={false}
showPlayBtn={false}
showCenterPlayBtn={true}
enableProgressGesture={false}
enablePlayGesture enablePlayGesture
autoPauseIfOpenNative autoPauseIfOpenNative
autoPauseIfNavigate
showFullscreenBtn={false}
enableProgressGesture={false}
/> />
) )
} }

Loading…
Cancel
Save