|
|
|
@ -1,5 +1,5 @@ |
|
|
|
|
import {FC, useState} from "react"; |
|
|
|
|
import {View} from "@tarojs/components"; |
|
|
|
|
import {Image, View} from "@tarojs/components"; |
|
|
|
|
import styles from "./home.module.scss"; |
|
|
|
|
import Adware from "@/pages/home/components/adware"; |
|
|
|
|
import Feature from "@/pages/home/components/feature"; |
|
|
|
@ -9,11 +9,14 @@ import MyButton from "@/components/button/MyButton"; |
|
|
|
|
import {Profile} from "@/store"; |
|
|
|
|
import Taro from "@tarojs/taro"; |
|
|
|
|
import {HomeApi, HomeData} from "@/api"; |
|
|
|
|
import logo from '@/static/img/logo.png' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Home: FC = () => { |
|
|
|
|
const globalData = Taro.getApp().globalData |
|
|
|
|
const {token} = Profile.useContainer() |
|
|
|
|
const [data, setData] = useState<null | HomeData>(null) |
|
|
|
|
console.log(globalData) |
|
|
|
|
|
|
|
|
|
function unLogin() { |
|
|
|
|
Taro.removeStorageSync('profile') |
|
|
|
@ -28,6 +31,9 @@ const Home: FC = () => { |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<View className={styles.content}> |
|
|
|
|
<View className={styles.header} style={{padding: `${globalData.statusBarHeight}px 0 10px 0`}}> |
|
|
|
|
<Image src={logo} className={styles.logo} mode='aspectFit'/> |
|
|
|
|
</View> |
|
|
|
|
<Adware data={data?.adverts || []} only_flag='routine_home_top_banner' width={710}/> |
|
|
|
|
<Feature/> |
|
|
|
|
<FeatureRecommended |
|
|
|
|