Compare commits
3 Commits
887b7a4bb6
...
a318591244
Author | SHA1 | Date |
---|---|---|
king | a318591244 | 1 year ago |
king | 278a408137 | 1 year ago |
king | 4cc69d9c2f | 1 year ago |
@ -1,12 +0,0 @@ |
|||||||
.imgBox { |
|
||||||
position: relative; |
|
||||||
} |
|
||||||
|
|
||||||
.imgError { |
|
||||||
position: absolute; |
|
||||||
top: 0; |
|
||||||
left: 0; |
|
||||||
bottom: 0; |
|
||||||
right: 0; |
|
||||||
margin: auto; |
|
||||||
} |
|
@ -0,0 +1,27 @@ |
|||||||
|
.container { |
||||||
|
width: 100%; |
||||||
|
padding: 20rpx; |
||||||
|
box-sizing: border-box; |
||||||
|
columns: 2; |
||||||
|
column-gap: 20rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.health { |
||||||
|
break-inside: avoid; |
||||||
|
background: #fff; |
||||||
|
border-radius: 10px; |
||||||
|
overflow: hidden; |
||||||
|
margin-bottom: 20rpx; |
||||||
|
position: relative; |
||||||
|
} |
||||||
|
|
||||||
|
.play { |
||||||
|
position: absolute; |
||||||
|
min-height: 70rpx !important; |
||||||
|
z-index: 9999; |
||||||
|
width: 40rpx !important; |
||||||
|
height: 40rpx !important; |
||||||
|
top: 20rpx; |
||||||
|
right: 20rpx; |
||||||
|
background: transparent !important; |
||||||
|
} |
@ -0,0 +1,35 @@ |
|||||||
|
import {FC} from "react"; |
||||||
|
import styles from "@/pages/preview/health/health.module.scss"; |
||||||
|
import {Image, Text, View} from "@tarojs/components"; |
||||||
|
import Img from "@/components/image/image"; |
||||||
|
import play from "@/static/img/play-back.png"; |
||||||
|
import {formatDate} from "@/utils/time"; |
||||||
|
import Taro from "@tarojs/taro"; |
||||||
|
|
||||||
|
interface Props { |
||||||
|
data: VideList |
||||||
|
errorType?: ImgErrType |
||||||
|
} |
||||||
|
|
||||||
|
const VideoList: FC<Props> = ({data, errorType}) => { |
||||||
|
function jump() { |
||||||
|
Taro.preload(data) |
||||||
|
Taro.navigateTo({url: `/pages/preview/videoFull/videoFull?id=${data.id}`}) |
||||||
|
} |
||||||
|
|
||||||
|
return ( |
||||||
|
<View key={data.id} className={styles.health} onClick={jump}> |
||||||
|
<Img src={data.url_path} mode='widthFix' errorType={errorType}/> |
||||||
|
<Image src={play} className={styles.play} mode='aspectFit'/> |
||||||
|
<View className='p-1'> |
||||||
|
<View className='text-ellipsis-2 text-dark'>{data.title}</View> |
||||||
|
<View className='text-ellipsis-2 mt-1 font-26 text-secondary'>{data.introduction}</View> |
||||||
|
<View className='font-24 text-muted my-2 flex justify-between'> |
||||||
|
<Text>{formatDate(new Date(data.publish_time), "YY-MM-dd")}</Text> |
||||||
|
<Text>{data.video_view}观看</Text> |
||||||
|
</View> |
||||||
|
</View> |
||||||
|
</View>) |
||||||
|
} |
||||||
|
|
||||||
|
export default VideoList |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 109 KiB |
Loading…
Reference in new issue