修改视频样式

v2
king 1 year ago
parent aeb6e1bbc5
commit 9f17e4c886
  1. 44
      src/pages/my/my.module.scss
  2. 13
      src/pages/my/my.tsx
  3. 34
      src/pages/preview/videoFull/videoFull.module.scss
  4. 25
      src/pages/preview/videoFull/videoFull.tsx

@ -53,46 +53,12 @@ page {
}
}
/*.page {
background: linear-gradient(180deg, #45D4A8 0%, rgba(69, 212, 168, 0) 100%) no-repeat;
background-size: 100% 458rpx;
width: 100%;
overflow: hidden;
&:before {
content: '';
display: block;
position: absolute;
top: -80rpx;
left: -80rpx;
width: 230rpx;
height: 230rpx;
background: #FFFF;
opacity: 0.2;
border-radius: 230rpx;
}
}*/
.content {
z-index: 8;
position: relative;
box-sizing: border-box;
padding: 0 30rpx 24rpx;
width: 100%;
//overflow: hidden;
/* &:after {
content: '';
display: block;
position: absolute;
top: 0rpx;
right: -100rpx;
width: 290rpx;
height: 290rpx;
background: #FFFF;
opacity: 0.2;
border-radius: 290rpx;
}*/
}
@ -127,8 +93,6 @@ page {
justify-content: space-between;
background: #fff;
height: 100%;
}
.timeImag {
@ -156,7 +120,6 @@ page {
background: #fff;
border-radius: 20rpx;
padding: 30rpx;
//margin-top: 30rpx;
}
.box {
@ -210,5 +173,12 @@ page {
}
}
}
}
.corporation {
font-size: 32rpx;
padding-bottom: 30rpx;
display: flex;
justify-content: center;
border-bottom: 2rpx solid #f5f8f7;
}

@ -22,6 +22,7 @@ interface List {
src: string,
type?: number
}
function jump(token: string | null, type?: number) {
if (!token) {
Taro.navigateTo({url: '/pages/login/login'})
@ -36,7 +37,7 @@ const My: FC = () => {
const {token, company, setCompany, user} = Profile.useContainer()
const [companyShow, setCompanyShow] = useState(false)
const [companyList, setCompanyList] = useState<Company[]>([])
const [courseRecord,setCourseRecord] = useState<Course | undefined>(undefined)
const [courseRecord, setCourseRecord] = useState<Course | undefined>(undefined)
const [navbarOpacity, setNavbarOpacity] = useState('0')
const navbarHeight = globalData.statusBarHeight + globalData.textBarHeight;
const [auditMode, setAuditMode] = useState(true)
@ -123,22 +124,16 @@ const My: FC = () => {
</>
}
<Service/>
<PageContainer
overlayStyle={'background:rgba(0,0,0,0.3)'}
overlayStyle='background:rgba(0,0,0,0.3)'
position='bottom'
round
show={companyShow}
onClickOverlay={() => setCompanyShow(false)}>
<View className="px-3 py-5">
<View className="font-32 pb-3" style={{
display: 'flex',
justifyContent: 'center',
borderBottom: '2rpx solid #f5f8f7'
}}>
</View>
<View className={styles.corporation}></View>
{
companyList.length >= 1 &&
companyList.map((d, idx) =>

@ -10,19 +10,43 @@ page {
top: 0;
left: 0;
right: 0;
bottom: calc(env(safe-area-inset-bottom) + 320rpx);
bottom: calc(env(safe-area-inset-bottom) + 200rpx);
margin: auto;
background: #000;
}
.text {
position: fixed;
z-index: 20;
width: 100%;
color: #fff;
bottom: calc(env(safe-area-inset-bottom));
padding: 0 30rpx;
box-sizing: border-box;
color: #FFFFFF;
transform: translateY(-200%);
}
.title {
position: fixed;
z-index: 10;
bottom: env(safe-area-inset-bottom);
width: 100%;
color: #fff;
padding:20rpx 30rpx;
box-sizing: border-box;
background: #000;
width: 100%;
bottom: env(safe-area-inset-bottom);
padding: 0 50rpx;
box-sizing: border-box;
height: 100rpx;
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 26rpx;
font-family: PingFang SC-Medium, PingFang SC;
}
.img {
width: 48rpx;
height: 48rpx;
verticalAlign: middle;
margin-right: 15rpx;
}

@ -1,4 +1,4 @@
import {Video, View} from "@tarojs/components";
import {Video, View, Text, Image} from "@tarojs/components";
import {FC, useState} from "react";
import Taro from "@tarojs/taro";
import styles from './videoFull.module.scss'
@ -6,6 +6,7 @@ import {brandApi, HomeApi} from "@/api";
import Collect from "@/components/collect/collect";
import Spin from "@/components/spinner";
import VideoEvent from "@/hooks/videoEvent";
import palyWhite from '@/static/img/palyWhite.png'
interface Params {
id: string
@ -107,16 +108,22 @@ const VideoFull: FC = () => {
onPause={() => setpalying(false)}
onError={onError}
/>
<View className={styles.text}>
<View className='font-32 font-weight'>{data.title}</View>
<View className='font-28 mt-2 text-ellipsis-2'>{data.introduction}</View>
</View>
<View className={styles.title}>
<View className='flex'>
<View className='font-36 font-weight flex-1 pr-3 text-row1'>{data.title}</View>
<Collect owner_id={Number(id)}
owner_type={2}
styles={{color: '#fff', width: 'auto'}}
select={data.collects}/>
<View className='flex align-center mr-5'>
<Image src={palyWhite} mode='widthFix' className={styles.img}/>
<Text>{data.video_view}</Text>
</View>
<View className='font-32'>{data.video_view}</View>
<View className='font-32 mt-1 text-ellipsis-1'>{data.introduction}</View>
<Collect owner_id={Number(id)}
owner_type={2}
stylesImage={{width: '48rpx', height: '48rpx'}}
styles={{color: '#fff', width: 'auto'}}
select={data.collects}/>
</View>
</> : <Spin enable={enable} overlay/>
}

Loading…
Cancel
Save