From e675ecc3d78e450d72f86602d39eacc012759c54 Mon Sep 17 00:00:00 2001 From: zoujing Date: Thu, 17 Sep 2026 17:05:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A6=96=E9=A1=B5=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/content.js | 9 ++-- src/pages/home/index.vue | 101 +++++++++++++++++++++++---------------- 2 files changed, 66 insertions(+), 44 deletions(-) diff --git a/src/api/content.js b/src/api/content.js index 2431ad5..323fe12 100644 --- a/src/api/content.js +++ b/src/api/content.js @@ -12,16 +12,17 @@ import { AGREEMENT_DATE, CUSTOMER_SERVICE_PHONE, CUSTOMER_SERVICE_TIME } from "@ import { USE_MOCK_CONTENT } from "@/config/env"; import { clone, cnDate, unique } from "@/utils"; import { applyLocalState, toPublicCard } from "@/api/benefit"; -import homepageMock from "@/mock/v1/homepage.json"; +// 首页已切真实接口,mock 保留注释便于回退 +// import homepageMock from "@/mock/v1/homepage.json"; import categoriesMock from "@/mock/v1/categories.json"; import merchantsMock from "@/mock/v1/merchants.json"; import detailsMock from "@/mock/v1/merchant-details.json"; import * as contentApi from "@/request/api/content"; -/** 首页聚合(品牌 / hero / 板块卡 / 精选推荐 / 导览 / 页脚) */ +/** 首页聚合(品牌 / hero / 板块卡 / 精选推荐 / 导览 / 页脚)—— 走真实接口 */ export const getHomepage = async () => { - if (!USE_MOCK_CONTENT) return contentApi.fetchHomepage(); - return clone(homepageMock); + // if (USE_MOCK_CONTENT) return clone(homepageMock); + return contentApi.fetchHomepage(); }; /** diff --git a/src/pages/home/index.vue b/src/pages/home/index.vue index ecfc2e9..ccac2b7 100644 --- a/src/pages/home/index.vue +++ b/src/pages/home/index.vue @@ -1,7 +1,7 @@