From 4db5488f9097fb1e69544c1a8e580019e5f41457 Mon Sep 17 00:00:00 2001 From: qiuyuan Date: Thu, 4 Dec 2025 14:42:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/index.vue | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 591831f..28d90a2 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -130,10 +130,7 @@ const onChange = (current: number) => { // 请求轮播 const fetchBannerList = async () => { try { - console.log('开始请求轮播图数据...'); const res: any = await getBannerList(); - console.log('API返回数据:', res); - // 处理返回的数据 if (res && Array.isArray(res) && res.length > 0) { const processedList = res.map((item: any, index: number) => { @@ -152,10 +149,8 @@ const fetchBannerList = async () => { }); bannerList.value = processedList; - console.log('处理后的轮播图数据:', bannerList.value); } else { // API返回空数据或无效数据,使用默认图片 - console.log('API返回无效数据,使用默认图片'); bannerList.value = [{ id: 0, image_url: defaultBanner }]; } } catch (error: any) { @@ -169,9 +164,7 @@ const fetchBannerList = async () => { const getGPUList = async () => { try { const res: any = await getGpuList(); - console.log('数据内容:', JSON.stringify(res, null, 2)); source.value = res; - console.log('GPU列表请求成功:', res); } catch (error: any) { console.error('GPU列表请求失败:', error); @@ -203,22 +196,12 @@ const getAdvantageList = async () => { } } -// 热门产品 -const getHotProductList = async () => { - try { - const res = await getHotProduct(); - console.log('热门产品请求成功:', res); - } catch (error: any) { // 捕获错误 - console.error('热门产品请求失败:', error); - } -} fetchBannerList(); getGPUList(); getAdvantageList(); -// getHotProductList();