医学道
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/home.tsx

38 lines
1.2 KiB

import {FC} from "react";
import {View} from "@tarojs/components";
import styles from "./home.module.scss";
import Taro from "@tarojs/taro";
import {Search} from "@/pages/home/components/search";
import Adware from "@/pages/home/components/adware";
import Feature from "@/pages/home/components/feature";
import FeatureRecommended from "@/pages/home/components/feature_recommended";
import CurRecommended from "@/pages/home/components/curRecommended";
import MyButton from "@/components/button/MyButton";
import {Profile} from "@/store";
const Home: FC = () => {
const menu = Taro.getMenuButtonBoundingClientRect()
const {token, empty} = Profile.useContainer()
const headerStyle: React.CSSProperties = {
height: `${menu.bottom}px`,
}
return (
<View className={styles.content} style={`paddingTop:${menu.bottom}px`}>
<View className={styles.header} style={headerStyle}></View>
<Search/>
<Adware/>
<Feature/>
<FeatureRecommended/>
<CurRecommended/>
{
!token && <View className={styles.tipsLogin} onClick={empty}>
<View>~</View>
<MyButton fillet size='mini'></MyButton>
</View>
}
</View>
)
}
export default Home