|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
import {FC, useEffect, useState} from "react"; |
|
|
|
|
import {FC, useState} from "react"; |
|
|
|
|
import {View} from "@tarojs/components"; |
|
|
|
|
import styles from "./home.module.scss"; |
|
|
|
|
import Adware from "@/pages/home/components/adware"; |
|
|
|
@ -20,11 +20,11 @@ const Home: FC = () => { |
|
|
|
|
Taro.navigateTo({url: '/pages/login/login'}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
Taro.useLoad(() => { |
|
|
|
|
HomeApi.home().then(res => { |
|
|
|
|
setData(res) |
|
|
|
|
}) |
|
|
|
|
}, []) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<View className={styles.content}> |
|
|
|
@ -37,7 +37,7 @@ const Home: FC = () => { |
|
|
|
|
skill={data?.skill || []} |
|
|
|
|
/> |
|
|
|
|
<Adware data={data?.adverts || []} only_flag='routine_home_recommend_banner' width={710}/> |
|
|
|
|
<CurRecommended/> |
|
|
|
|
{data && <CurRecommended/>} |
|
|
|
|
{ |
|
|
|
|
!token && <View className={styles.tipsLogin} onClick={unLogin}> |
|
|
|
|
<View>登录后享受更多学习服务~</View> |
|
|
|
|