|
|
|
@ -26,12 +26,13 @@ interface Data { |
|
|
|
|
url: string |
|
|
|
|
detailsUrl: string |
|
|
|
|
data: DataContent[] |
|
|
|
|
errorType: ImgErrType |
|
|
|
|
type?: 'health' | 'kill' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
interface Props { |
|
|
|
|
skill: Kill[] // 技能
|
|
|
|
|
health: Health[] // 健康
|
|
|
|
|
skill: VideList[] // 技能
|
|
|
|
|
health: VideList[] // 健康
|
|
|
|
|
brand: Brand[] // 品牌
|
|
|
|
|
illness: Illness[] // 疾病
|
|
|
|
|
} |
|
|
|
@ -42,27 +43,31 @@ const FeatureRecommended: FC<Props> = (props) => { |
|
|
|
|
titleUrl: brandTop, |
|
|
|
|
url: '/pages/preview/brand/list/list', |
|
|
|
|
detailsUrl: '/pages/preview/brand/info/info', |
|
|
|
|
data: [] |
|
|
|
|
data: [], |
|
|
|
|
errorType: 'brand', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
titleUrl: healthTop, |
|
|
|
|
url: '/pages/preview/health/health', |
|
|
|
|
detailsUrl: '/pages/preview/videoFull/videoFull', |
|
|
|
|
data: [], |
|
|
|
|
type: "health" |
|
|
|
|
type: "health", |
|
|
|
|
errorType: 'health' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
titleUrl: professionTop, |
|
|
|
|
url: '/pages/preview/profession/profession', |
|
|
|
|
detailsUrl: '/pages/preview/videoFull/videoFull', |
|
|
|
|
data: [], |
|
|
|
|
type: 'kill' |
|
|
|
|
type: 'kill', |
|
|
|
|
errorType: 'profession' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
titleUrl: illnessTop, |
|
|
|
|
url: '/pages/preview/illness/sort/sort', |
|
|
|
|
detailsUrl: '/pages/preview/illness/list/list', |
|
|
|
|
data: [] |
|
|
|
|
data: [], |
|
|
|
|
errorType: 'health' |
|
|
|
|
}, |
|
|
|
|
]) |
|
|
|
|
|
|
|
|
@ -153,7 +158,7 @@ const FeatureRecommended: FC<Props> = (props) => { |
|
|
|
|
<View className={styles.feature}> |
|
|
|
|
<Swiper nextMargin='30px' style={{height: '390rpx'}} circular autoplay> |
|
|
|
|
{ |
|
|
|
|
data.filter(d=>d.data.length === 3).map(d => <SwiperItem key={d.url}> |
|
|
|
|
data.filter(d => d.data.length === 3).map(d => <SwiperItem key={d.url}> |
|
|
|
|
<Image |
|
|
|
|
mode='heightFix' |
|
|
|
|
className={styles.featureTitle} |
|
|
|
@ -166,7 +171,7 @@ const FeatureRecommended: FC<Props> = (props) => { |
|
|
|
|
onClick={() => jump(d.detailsUrl + c.path, c.id, d.type)}> |
|
|
|
|
<View style={{position: 'relative'}}> |
|
|
|
|
<View className={styles.featureImage}> |
|
|
|
|
<Img src={c.imageUrl} height={100} width={140}/> |
|
|
|
|
<Img src={c.imageUrl} height={100} width={140} errorType={d.errorType}/> |
|
|
|
|
</View> |
|
|
|
|
<Image src={[first, second, third][index]} className={styles.ranking} mode='aspectFill'/> |
|
|
|
|
</View> |
|
|
|
|