diff --git a/src/pages.json b/src/pages.json
index 3137818..e06bb25 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -47,6 +47,12 @@
"style": {
"navigationBarTitleText": "登录"
}
+ },
+ {
+ "path": "pages/hot/hot",
+ "style": {
+ "navigationBarTitleText": "hot"
+ }
}
],
// 全局样式
diff --git a/src/pages/hot/hot.vue b/src/pages/hot/hot.vue
new file mode 100644
index 0000000..2337a94
--- /dev/null
+++ b/src/pages/hot/hot.vue
@@ -0,0 +1,7 @@
+
+ hot
+
+
+
+
+
diff --git a/src/pages/index/components/HotPanel.vue b/src/pages/index/components/HotPanel.vue
new file mode 100644
index 0000000..1a2e356
--- /dev/null
+++ b/src/pages/index/components/HotPanel.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+ {{ item.title }}
+ {{ item.alt }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 9189995..21c04bc 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -1,38 +1,53 @@
-
-
-
- home
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -42,4 +57,15 @@ page {
height: 100%;
overflow: hidden;
}
+
+.viewport {
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+}
+
+.scroll-view {
+ flex: 1;
+ overflow: hidden;
+}
diff --git a/src/services/home.ts b/src/services/home.ts
index 7707a5e..a7917a2 100644
--- a/src/services/home.ts
+++ b/src/services/home.ts
@@ -1,4 +1,4 @@
-import type { BannerItem, CategoryItem } from '@/types/home'
+import type { BannerItem, CategoryItem, HotItem } from '@/types/home'
import { http } from '@/utils/http'
/**
@@ -26,3 +26,14 @@ export const getCategory = () => {
method: 'GET',
})
}
+
+/**
+ * 获取首页热门商品
+ * @returns 热门商品数据
+ */
+export const getHomeHot = () => {
+ return http({
+ url: '/home/hot/mutli',
+ method: 'GET',
+ })
+}