diff --git a/src/components/JbcGuess.vue b/src/components/JbcGuess.vue
index 127769a..3877a74 100644
--- a/src/components/JbcGuess.vue
+++ b/src/components/JbcGuess.vue
@@ -25,7 +25,7 @@
diff --git a/src/services/home.ts b/src/services/home.ts
index 79097bb..2486152 100644
--- a/src/services/home.ts
+++ b/src/services/home.ts
@@ -7,7 +7,7 @@ import { http } from '@/utils/http'
* @param distributionSite - 广告区域展示位置: 1 为首页(默认值); 2 为商品分类页
* @returns 轮播图数据
*/
-export const getHomeBanner = (distributionSite = 1) => {
+export const getHomeBannerAPI = (distributionSite = 1) => {
return http({
url: '/home/banner',
method: 'GET',
@@ -21,7 +21,7 @@ export const getHomeBanner = (distributionSite = 1) => {
* 获取首页分类
* @returns 分类数据
*/
-export const getCategory = () => {
+export const getCategoryAPI = () => {
return http({
url: '/home/category/mutli',
method: 'GET',
@@ -32,7 +32,7 @@ export const getCategory = () => {
* 获取首页热门商品
* @returns 热门商品数据
*/
-export const getHomeHot = () => {
+export const getHomeHotAPI = () => {
return http({
url: '/home/hot/mutli',
method: 'GET',
@@ -44,7 +44,7 @@ export const getHomeHot = () => {
* @param data - 分页参数
* @returns 猜你喜欢数据
*/
-export const getGuessLike = (data?: PageParams) => {
+export const getGuessLikeAPI = (data?: PageParams) => {
return http>({
url: '/home/goods/guessLike',
method: 'GET',
diff --git a/src/services/hot.ts b/src/services/hot.ts
index 36f44d0..1392bed 100644
--- a/src/services/hot.ts
+++ b/src/services/hot.ts
@@ -9,7 +9,7 @@ type HotParams = PageParams & {
/**
* 获取热门推荐
*/
-export const getHotRecommend = (url: string, data: HotParams) => {
+export const getHotRecommendAPI = (url: string, data: HotParams) => {
return http({
url,
method: 'GET',
diff --git a/src/types/category.d.ts b/src/types/category.d.ts
new file mode 100644
index 0000000..180f2fc
--- /dev/null
+++ b/src/types/category.d.ts
@@ -0,0 +1,27 @@
+import type { GoodsItem } from './global'
+
+/** 一级分类项 */
+export type CategoryTopItem = {
+ /** 二级分类集合[ 二级分类项 ] */
+ children: CategoryChildItem[]
+ /** 一级分类id */
+ id: string
+ /** 一级分类图片集[ 一级分类图片项 ] */
+ imageBanners: string[]
+ /** 一级分类名称 */
+ name: string
+ /** 一级分类图片 */
+ picture: string
+}
+
+/** 二级分类项 */
+export type CategoryChildItem = {
+ /** 商品集合[ 商品项 ] */
+ goods: GoodsItem[]
+ /** 二级分类id */
+ id: string
+ /** 二级分类名称 */
+ name: string
+ /** 二级分类图片 */
+ picture: string
+}