|
|
|
@ -2,10 +2,10 @@ import {FC, useEffect, useState} 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"; |
|
|
|
|
import videoEvent from "@/hooks/videoEvent"; |
|
|
|
|
import palyWhite from '@/static/img/palyWhite.png' |
|
|
|
|
import starWhite from '@/static/img/starWhite.png' |
|
|
|
|
|
|
|
|
|
interface Props { |
|
|
|
|
data: VideList |
|
|
|
@ -40,13 +40,24 @@ const VideoList: FC<Props> = (props) => { |
|
|
|
|
return ( |
|
|
|
|
<View key={data.id} className={styles.health} onClick={jump}> |
|
|
|
|
<Img src={data.url_path} mode='widthFix' errorType={props.errorType} height={346}/> |
|
|
|
|
<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 || 0)}观看</Text> |
|
|
|
|
<View className='p-2 relative'> |
|
|
|
|
<View className='text-ellipsis-1 font-28 text-dark'>{data.title}</View> |
|
|
|
|
<View className='text-ellipsis-2 mt-2 font-24 text-secondary'>{data.introduction}</View> |
|
|
|
|
|
|
|
|
|
<View className={styles.info}> |
|
|
|
|
<View className='flex'> |
|
|
|
|
<View className='flex align-center mr-3'> |
|
|
|
|
<Image src={palyWhite}/> |
|
|
|
|
<Text>{(data.video_view || 0)}</Text> |
|
|
|
|
</View> |
|
|
|
|
|
|
|
|
|
<View className='flex align-center'> |
|
|
|
|
<Image src={starWhite}/> |
|
|
|
|
<Text>{(data.video_view || 0)}</Text> |
|
|
|
|
</View> |
|
|
|
|
</View> |
|
|
|
|
|
|
|
|
|
<View>1:00</View> |
|
|
|
|
</View> |
|
|
|
|
</View> |
|
|
|
|
</View>) |
|
|
|
|