医学道
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
video/src/pages/home/components/feature.tsx

34 lines
1.1 KiB

import {FC} from "react";
import {Image, View} from "@tarojs/components";
import illness from '@/static/img/illness.png'
import profession from '@/static/img/profession.png'
import health from '@/static/img/health.png'
import article from '@/static/img/article.png'
import styles from '../home.module.scss'
import Taro from "@tarojs/taro";
const list = [
{url: '/pages/preview/brand/list/list', image: article, text: '企业品牌'},
{url: '/pages/preview/health/health', image: health, text: '健康常识'},
{url: '/pages/preview/profession/profession', image: profession, text: '专业技能'},
{url: '/pages/preview/illness/sort/sort', image: illness, text: '病症百科'},
]
function jump(url) {
Taro.navigateTo({url})
}
const Feature: FC = () => {
return (
<View className='flex justify-around' style={{marginBottom: '20px'}}>
{
list.map(d => <View className='text-center' onClick={() => jump(d.url)}>
<Image src={d.image} style={{width: '48px', height: '48px', verticalAlign: 'middle'}}/>
<View className={styles.featureList}>{d.text}</View>
</View>)
}
</View>
)
}
export default Feature