From 83ba49d8605b6779deaaee6182d9fc0b0234c640 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com>
Date: Sat, 7 Mar 2026 15:20:16 +0800
Subject: [PATCH] =?UTF-8?q?fix(home):=20=E6=9B=B4=E6=96=B0=E9=A6=96?=
=?UTF-8?q?=E9=A1=B5=E5=95=86=E5=93=81=E5=88=86=E7=B1=BB=E9=85=8D=E7=BD=AE?=
=?UTF-8?q?=E5=B9=B6=E4=BC=98=E5=8C=96=E8=B7=B3=E8=BD=AC=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修改开发环境API_BASE_URL配置
- 引入通用导航工具函数navTo
- 更新商品分类标签名称为桶装水和水票套餐
- 添加政企采购专区卡片组件
- 集成桂乐淘福利惊爆区跳转功能
- 修复页面布局结构中的多余空行问题
---
config/env.ts | 4 ++--
src/pages/index/index.tsx | 22 ++++++++++++++++++----
2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/config/env.ts b/config/env.ts
index 8eb6791..4ec1704 100644
--- a/config/env.ts
+++ b/config/env.ts
@@ -2,8 +2,8 @@
export const ENV_CONFIG = {
// 开发环境
development: {
- API_BASE_URL: 'http://127.0.0.1:9200/api',
- // API_BASE_URL: 'https://glt-api.websoft.top/api',
+ // API_BASE_URL: 'http://127.0.0.1:9200/api',
+ API_BASE_URL: 'https://glt-api.websoft.top/api',
APP_NAME: '开发环境',
DEBUG: 'true',
},
diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx
index cbc8cf0..1efe053 100644
--- a/src/pages/index/index.tsx
+++ b/src/pages/index/index.tsx
@@ -11,6 +11,7 @@ import type { ShopGoods, ShopGoodsParam } from '@/api/shop/shopGoods/model'
import { getMyGltUserTicketTotal } from '@/api/glt/gltUserTicket'
import { ensureLoggedIn } from '@/utils/auth'
import './index.scss'
+import navTo from "@/utils/common";
function Home() {
const [activeTabKey, setActiveTabKey] = useState('recommend')
@@ -178,8 +179,8 @@ function Home() {
>(
() => [
{ key: 'recommend', title: '推荐', params: { recommend: 1 } },
- { key: '4476', title: '政企采购专区', params: { categoryId: 4476 } },
- { key: '4556', title: '桂乐淘·福利惊爆区', params: { categoryId: 4556 } },
+ { key: '4476', title: '桶装水', params: { categoryId: 4476 } },
+ { key: '4556', title: '水票套餐', params: { categoryId: 4556 } },
// { key: '4557', title: '购机套餐', params: { categoryId: 4557 } },
// { key: '4477', title: '饮水设备', params: { categoryId: 4477 } },
],
@@ -289,7 +290,20 @@ function Home() {
- {/* 分类Tabs */}
+ Taro.navigateTo({ url: `/shop/category/index?id=4557` })}>
+
+ 政企采购专区
+
+
+
+
+ navTo('/shop/category/index?id=4556')}>
+
+ 桂乐淘·福利惊爆区
+
+
+
+ {/*分类Tabs*/}
{tabs.map((tab) => {
@@ -306,7 +320,6 @@ function Home() {
})}
-
{/* 商品列表 */}
{visibleGoods.map((item) => (
@@ -356,6 +369,7 @@ function Home() {
))}
+
>
)