index.vue
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<script setup>
const recommendList = ref([]);
const appList = ref([]);
const { data: RecommendData } = await useFetch(
"http://aitoolht.crgx.net/dh/app/listFrontApp",
{
method: "get",
params: { pageSize: 10, pageNum: 1, isRecommend: "1" },
}
);
const { data: allData } = await useFetch(
"http://aitoolht.crgx.net/dh/app/allFrontApp"
);
recommendList.value = RecommendData.value.rows;
appList.value = allData.value.data;
</script>
<template>
<div class="flex flex-col min-h-screen bg-white">
<main class="flex-grow md:p-6 p-2 bg-white">
<!-- Banner 区域 -->
<HomeBanner />
<!-- 广告区域 -->
<!-- 工具展示区 -->
<section class="md:mb-12 mb-6">
<!-- 推荐工具区 -->
<HomeRecommend
:recommendList="recommendList"
navTitle="推荐工具"
navIcon="star"
/>
<div v-for="appItem in appList" class="md:mb-12 mb-6">
<!-- 分类导航及内容 -->
<HomeContent :appData="appItem" />
</div>
</section>
</main>
</div>
</template>