增加视频组件内容

v2
king 1 year ago
parent aa4e006b00
commit cb88f49e85
  1. 5
      src/components/videoList/videoList.tsx
  2. 2
      types/home.d.ts

@ -6,6 +6,7 @@ import Taro from "@tarojs/taro";
import videoEvent from "@/hooks/videoEvent"; import videoEvent from "@/hooks/videoEvent";
import palyWhite from '@/static/img/palyWhite.png' import palyWhite from '@/static/img/palyWhite.png'
import starWhite from '@/static/img/starWhite.png' import starWhite from '@/static/img/starWhite.png'
import {formatMinute} from "@/utils/time";
interface Props { interface Props {
data: VideList data: VideList
@ -53,11 +54,11 @@ const VideoList: FC<Props> = (props) => {
<View className='flex align-center'> <View className='flex align-center'>
<Image src={starWhite}/> <Image src={starWhite}/>
<Text>{(data.video_view || 0)}</Text> <Text>{(data.collect_quantity || 0)}</Text>
</View> </View>
</View> </View>
<View>1:00</View> <View>{formatMinute(data.duration || 0)}</View>
</View> </View>
</View> </View>
</View>) </View>)

2
types/home.d.ts vendored

@ -8,6 +8,8 @@ interface VideList {
video_view: number video_view: number
publish_time:string publish_time:string
collects:boolean collects:boolean
duration:number
collect_quantity:number
} }
interface Brand { interface Brand {

Loading…
Cancel
Save