首页样式

main
king 1 year ago
parent 7d1d347561
commit 9d934feaa2
  1. 8
      src/api/home.ts
  2. 4
      src/pages/home/components/feature_recommended.tsx
  3. 6
      src/pages/home/home.tsx
  4. BIN
      src/static/img/arrow-right.png

@ -33,8 +33,12 @@ export interface HomeData {
adverts: AdwareType[] adverts: AdwareType[]
skill: Kill[] skill: Kill[]
health: Health[] health: Health[]
brand: Brand[] brand: {
illness: Illness[] list: Brand[]
}
illness: {
list: Illness[]
}
} }
export const HomeApi = { export const HomeApi = {

@ -75,9 +75,7 @@ const FeatureRecommended: FC<Props> = (props) => {
description: d.graphic_introduction, description: d.graphic_introduction,
path: `?id=${d.id}`, path: `?id=${d.id}`,
})) }))
} catch (e) { } catch (e) {}
console.log(e)
}
return [] return []
} }

@ -1,7 +1,6 @@
import {FC, useEffect, useState} from "react"; import {FC, useEffect, useState} from "react";
import {View} from "@tarojs/components"; import {View} from "@tarojs/components";
import styles from "./home.module.scss"; import styles from "./home.module.scss";
// import {Search} from "@/pages/home/components/search";
import Adware from "@/pages/home/components/adware"; import Adware from "@/pages/home/components/adware";
import Feature from "@/pages/home/components/feature"; import Feature from "@/pages/home/components/feature";
import FeatureRecommended from "@/pages/home/components/feature_recommended"; import FeatureRecommended from "@/pages/home/components/feature_recommended";
@ -29,13 +28,12 @@ const Home: FC = () => {
return ( return (
<View className={styles.content}> <View className={styles.content}>
{/*<Search/>*/}
<Adware data={data?.adverts || []} only_flag='routine_home_top_banner' width={710}/> <Adware data={data?.adverts || []} only_flag='routine_home_top_banner' width={710}/>
<Feature/> <Feature/>
<FeatureRecommended <FeatureRecommended
illness={(data?.illness as any)?.list || []} illness={data?.illness.list || []}
health={data?.health || []} health={data?.health || []}
brand={((data?.brand as any)?.list) || []} brand={data?.brand.list || []}
skill={data?.skill || []} skill={data?.skill || []}
/> />
<Adware data={data?.adverts || []} only_flag='routine_home_recommend_banner' width={710}/> <Adware data={data?.adverts || []} only_flag='routine_home_recommend_banner' width={710}/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Loading…
Cancel
Save