From 7c16f8bcce74f2f7efd7710446f5ec93a5698af1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=9D=B0?= Date: Fri, 12 Sep 2025 15:36:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B0=86list=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81=E8=BF=81=E7=A7=BB=E5=88=B0game=5Fpa?= =?UTF-8?q?ges=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +-- config/prod.ts | 2 +- src/container/inputCustomerNavbar/index.tsx | 2 +- src/container/listCustomNavbar/index.tsx | 6 ++-- src/game_pages/detail/index.tsx | 8 ++--- .../list/index.config.ts | 0 .../list/index.module.scss | 0 src/{pages => game_pages}/list/index.tsx | 6 ++-- .../search/index.config.ts | 0 src/{pages => game_pages}/search/index.scss | 0 src/{pages => game_pages}/search/index.tsx | 2 +- .../searchResult/index.config.ts | 0 .../searchResult/index.scss | 0 .../searchResult/index.tsx | 0 src/order_pages/orderDetail/index.tsx | 2 +- src/pages/home/index.tsx | 4 +-- src/pages/login/index/index.tsx | 2 +- src/pages/login/verification/index.tsx | 6 ++-- src/store/README.md | 36 +++++++++---------- 19 files changed, 40 insertions(+), 40 deletions(-) rename src/{pages => game_pages}/list/index.config.ts (100%) rename src/{pages => game_pages}/list/index.module.scss (100%) rename src/{pages => game_pages}/list/index.tsx (98%) rename src/{pages => game_pages}/search/index.config.ts (100%) rename src/{pages => game_pages}/search/index.scss (100%) rename src/{pages => game_pages}/search/index.tsx (99%) rename src/{pages => game_pages}/searchResult/index.config.ts (100%) rename src/{pages => game_pages}/searchResult/index.scss (100%) rename src/{pages => game_pages}/searchResult/index.tsx (100%) diff --git a/README.md b/README.md index 1f3c764..b98f64d 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ npm run build:alipay # 支付宝小程序 ## 页面路由 -- `/pages/list/index` - 首页 +- `/game_pages/list/index` - 首页 - `/pages/publish/publish` - 原发布页面 - `/pages/publishBall/publishBall` - 新的约球发布页面 ⭐ - `/pages/dynamicFormDemo/dynamicFormDemo` - 动态表单演示页面 ⭐ @@ -148,4 +148,4 @@ src/ ## License -MIT \ No newline at end of file +MIT \ No newline at end of file diff --git a/config/prod.ts b/config/prod.ts index 7c7ba5f..4fa33e2 100644 --- a/config/prod.ts +++ b/config/prod.ts @@ -24,7 +24,7 @@ export default { // .plugin('prerender') // .use(new Prerender({ // staticDir, - // routes: [ '/pages/list/index' ], + // routes: [ '/game_pages/list/index' ], // postProcess: (context) => ({ ...context, outputPath: path.join(staticDir, 'index.html') }) // })) // } diff --git a/src/container/inputCustomerNavbar/index.tsx b/src/container/inputCustomerNavbar/index.tsx index 1b3b242..1690be3 100644 --- a/src/container/inputCustomerNavbar/index.tsx +++ b/src/container/inputCustomerNavbar/index.tsx @@ -37,7 +37,7 @@ const ListHeader = (props: IProps) => { const handleInputClick = () => { Taro.navigateTo({ - url: "/pages/search/index", + url: "/game_pages/search/index", }); } diff --git a/src/container/listCustomNavbar/index.tsx b/src/container/listCustomNavbar/index.tsx index 279f363..9d4e8da 100644 --- a/src/container/listCustomNavbar/index.tsx +++ b/src/container/listCustomNavbar/index.tsx @@ -44,11 +44,11 @@ const ListHeader = (props: IProps) => { const pages = Taro.getCurrentPages(); const currentPage = pages[pages.length - 1]; const currentPagePath = currentPage.route; - if (currentPagePath === "pages/searchResult/index") { + if (currentPagePath === "game_pages/searchResult/index") { Taro.navigateBack(); } else { Taro.navigateTo({ - url: "/pages/search/index", + url: "/game_pages/search/index", }); } }; @@ -56,7 +56,7 @@ const ListHeader = (props: IProps) => { // 点击logo const handleLogoClick = () => { Taro.redirectTo({ - url: "pages/list/index", // 列表页 + url: "game_pages/list/index", // 列表页 }); }; diff --git a/src/game_pages/detail/index.tsx b/src/game_pages/detail/index.tsx index e8e1ba2..e3c929f 100644 --- a/src/game_pages/detail/index.tsx +++ b/src/game_pages/detail/index.tsx @@ -259,18 +259,18 @@ function StickyButton(props) { ) { return { text: "球局已结束,查看其他球局", - action: navto.bind(null, "/pages/list/index"), + action: navto.bind(null, "/game_pages/list/index"), }; } if (waiting_start) { return { text: "等待开始, 查看更多球局", - action: navto.bind(null, "/pages/list/index"), + action: navto.bind(null, "/game_pages/list/index"), }; } else if (is_substituting) { return { text: "候补中,查看其他球局", - action: navto.bind(null, "/pages/list/index"), + action: navto.bind(null, "/game_pages/list/index"), }; } else if (can_pay) { return { @@ -1036,7 +1036,7 @@ function Index() { const pages = Taro.getCurrentPages(); if (pages.length <= 1) { Taro.redirectTo({ - url: "/pages/list/index", + url: "/game_pages/list/index", }); } else { Taro.navigateBack(); diff --git a/src/pages/list/index.config.ts b/src/game_pages/list/index.config.ts similarity index 100% rename from src/pages/list/index.config.ts rename to src/game_pages/list/index.config.ts diff --git a/src/pages/list/index.module.scss b/src/game_pages/list/index.module.scss similarity index 100% rename from src/pages/list/index.module.scss rename to src/game_pages/list/index.module.scss diff --git a/src/pages/list/index.tsx b/src/game_pages/list/index.tsx similarity index 98% rename from src/pages/list/index.tsx rename to src/game_pages/list/index.tsx index cb53331..6a8fe2e 100644 --- a/src/pages/list/index.tsx +++ b/src/game_pages/list/index.tsx @@ -1,4 +1,4 @@ -import SearchBar from "../../components/SearchBar"; +import SearchBar from "@/components/SearchBar"; import FilterPopup from "@/components/FilterPopup"; import styles from "./index.module.scss"; import { useEffect } from "react"; @@ -89,7 +89,7 @@ const ListPage = () => { console.error('更新用户位置失败:', error); } } - + // 页面加载时获取数据 getMatchesData(); return location; @@ -159,7 +159,7 @@ const ListPage = () => { const handleSearchClick = () => { Taro.navigateTo({ - url: "/pages/search/index", + url: "/game_pages/search/index", }); }; diff --git a/src/pages/search/index.config.ts b/src/game_pages/search/index.config.ts similarity index 100% rename from src/pages/search/index.config.ts rename to src/game_pages/search/index.config.ts diff --git a/src/pages/search/index.scss b/src/game_pages/search/index.scss similarity index 100% rename from src/pages/search/index.scss rename to src/game_pages/search/index.scss diff --git a/src/pages/search/index.tsx b/src/game_pages/search/index.tsx similarity index 99% rename from src/pages/search/index.tsx rename to src/game_pages/search/index.tsx index a44c9f0..c96e757 100644 --- a/src/pages/search/index.tsx +++ b/src/game_pages/search/index.tsx @@ -101,7 +101,7 @@ const ListSearch = () => { return; } Taro.navigateTo({ - url: `/pages/searchResult/index`, + url: `/game_pages/searchResult/index`, }); }; diff --git a/src/pages/searchResult/index.config.ts b/src/game_pages/searchResult/index.config.ts similarity index 100% rename from src/pages/searchResult/index.config.ts rename to src/game_pages/searchResult/index.config.ts diff --git a/src/pages/searchResult/index.scss b/src/game_pages/searchResult/index.scss similarity index 100% rename from src/pages/searchResult/index.scss rename to src/game_pages/searchResult/index.scss diff --git a/src/pages/searchResult/index.tsx b/src/game_pages/searchResult/index.tsx similarity index 100% rename from src/pages/searchResult/index.tsx rename to src/game_pages/searchResult/index.tsx diff --git a/src/order_pages/orderDetail/index.tsx b/src/order_pages/orderDetail/index.tsx index 0423eae..340b3ec 100644 --- a/src/order_pages/orderDetail/index.tsx +++ b/src/order_pages/orderDetail/index.tsx @@ -324,7 +324,7 @@ const OrderCheck = () => { @@ -80,17 +80,17 @@ import { useUserActions } from '../store/userStore' function MyComponent() { const { incrementRequestCount } = useUserActions() const [loading, setLoading] = useState(false) - + const handleSendRequest = async () => { setLoading(true) - + try { // 模拟网络延迟 await new Promise(resolve => setTimeout(resolve, 1000)) - + // 更新请求计数 incrementRequestCount() - + console.log('请求成功!') } catch (error) { console.error('请求失败:', error) @@ -98,7 +98,7 @@ function MyComponent() { setLoading(false) } } - + return (