From 859ffec8529d501c6ecd8d338e6d3306d83c0d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=9D=B0?= Date: Fri, 12 Sep 2025 15:30:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=86=E5=8C=85=20=E9=99=A4=E4=BA=86?= =?UTF-8?q?list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.config.ts | 27 ++++++++++++++----- src/components/GuideBar/index.tsx | 2 +- src/components/ListCard/index.tsx | 2 +- src/components/NTRPEvaluatePopup/index.tsx | 2 +- .../detail/index.config.ts | 0 .../detail/index.scss | 0 src/{mod_user => game_pages}/detail/index.tsx | 8 +++--- src/mod_user/pages/myself/index.tsx | 4 +-- src/mod_user/pages/other/index.tsx | 2 +- .../orderDetail/config.ts | 0 .../orderDetail/index.config.ts | 0 .../orderDetail/index.module.scss | 0 .../orderDetail/index.tsx | 0 .../orderList/index.config.ts | 0 .../orderList/index.module.scss | 0 .../orderList/index.tsx | 2 +- .../favorites/index.config.ts | 0 .../favorites/index.scss | 0 .../favorites/index.tsx | 0 .../message/index.config.ts | 0 .../message/index.scss | 0 .../message/index.tsx | 0 .../ntrp-evaluate/index.config.ts | 0 .../ntrp-evaluate/index.module.scss | 0 .../ntrp-evaluate/index.tsx | 0 src/pages/publishBall/index.tsx | 4 +-- 26 files changed, 33 insertions(+), 20 deletions(-) rename src/{mod_user => game_pages}/detail/index.config.ts (100%) rename src/{mod_user => game_pages}/detail/index.scss (100%) rename src/{mod_user => game_pages}/detail/index.tsx (99%) rename src/{mod_user => order_pages}/orderDetail/config.ts (100%) rename src/{mod_user => order_pages}/orderDetail/index.config.ts (100%) rename src/{mod_user => order_pages}/orderDetail/index.module.scss (100%) rename src/{mod_user => order_pages}/orderDetail/index.tsx (100%) rename src/{mod_user => order_pages}/orderList/index.config.ts (100%) rename src/{mod_user => order_pages}/orderList/index.module.scss (100%) rename src/{mod_user => order_pages}/orderList/index.tsx (99%) rename src/{mod_user => other_pages}/favorites/index.config.ts (100%) rename src/{mod_user => other_pages}/favorites/index.scss (100%) rename src/{mod_user => other_pages}/favorites/index.tsx (100%) rename src/{mod_user => other_pages}/message/index.config.ts (100%) rename src/{mod_user => other_pages}/message/index.scss (100%) rename src/{mod_user => other_pages}/message/index.tsx (100%) rename src/{mod_user => other_pages}/ntrp-evaluate/index.config.ts (100%) rename src/{mod_user => other_pages}/ntrp-evaluate/index.module.scss (100%) rename src/{mod_user => other_pages}/ntrp-evaluate/index.tsx (100%) diff --git a/src/app.config.ts b/src/app.config.ts index 0ded27a..c6e6c12 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -1,14 +1,9 @@ export default defineAppConfig({ pages: [ "pages/home/index", //中转页 - "pages/login/index/index", "pages/login/verification/index", "pages/login/terms/index", - - "pages/list/index", // 列表页 - "pages/search/index", // 搜索页 - "pages/searchResult/index", // 搜索结果页面 "pages/publishBall/index", ], subPackages: [ @@ -17,14 +12,32 @@ export default defineAppConfig({ pages: [ "pages/myself/index", // 个人中心 "pages/edit/index", // 个人中心 + ], + }, + { + root: 'game_pages', + pages: [ + "list/index", // 列表页 + "search/index", // 搜索页 + "searchResult/index", // 搜索结果页面 "detail/index", // 球局详情页 - "message/index", // 消息页 + ], + }, + { + root: 'order_pages', + pages: [ "orderList/index", // 订单列表页 "orderDetail/index", // 订单详情页 + ], + }, + { + root: 'other_pages', + pages: [ + "message/index", // 消息页 "favorites/index", // 收藏页 "ntrp-evaluate/index", // NTRP评估页 ], - }, + } ], window: { diff --git a/src/components/GuideBar/index.tsx b/src/components/GuideBar/index.tsx index f8183d7..6ffe169 100644 --- a/src/components/GuideBar/index.tsx +++ b/src/components/GuideBar/index.tsx @@ -40,7 +40,7 @@ const GuideBar = (props) => { url = "/mod_user/pages/myself/index"; } if (code === "message") { - url = "/mod_user/message/index"; + url = "/other_pages/message/index"; } Taro.redirectTo({ url: url, diff --git a/src/components/ListCard/index.tsx b/src/components/ListCard/index.tsx index b9600a5..166f9ca 100644 --- a/src/components/ListCard/index.tsx +++ b/src/components/ListCard/index.tsx @@ -34,7 +34,7 @@ const ListCard: React.FC = ({ const handleViewDetail = () => { console.log("id", id); Taro.navigateTo({ - url: `/mod_user/detail/index?id=${id || 1}&from=list`, + url: `/game_pages/detail/index?id=${id || 1}&from=list`, }); }; diff --git a/src/components/NTRPEvaluatePopup/index.tsx b/src/components/NTRPEvaluatePopup/index.tsx index aec7ede..724f678 100644 --- a/src/components/NTRPEvaluatePopup/index.tsx +++ b/src/components/NTRPEvaluatePopup/index.tsx @@ -61,7 +61,7 @@ const NTRPEvaluatePopup = (props: NTRPEvaluatePopupProps, ref) => { setVisible(false); // TODO: 实现NTRP评估逻辑 Taro.navigateTo({ - url: `/mod_user/ntrp-evaluate/index?redirect=${encodeURIComponent(getCurrentFullPath())}`, + url: `/other_pages/ntrp-evaluate/index?redirect=${encodeURIComponent(getCurrentFullPath())}`, }); } diff --git a/src/mod_user/detail/index.config.ts b/src/game_pages/detail/index.config.ts similarity index 100% rename from src/mod_user/detail/index.config.ts rename to src/game_pages/detail/index.config.ts diff --git a/src/mod_user/detail/index.scss b/src/game_pages/detail/index.scss similarity index 100% rename from src/mod_user/detail/index.scss rename to src/game_pages/detail/index.scss diff --git a/src/mod_user/detail/index.tsx b/src/game_pages/detail/index.tsx similarity index 99% rename from src/mod_user/detail/index.tsx rename to src/game_pages/detail/index.tsx index 29ee08e..e8e1ba2 100644 --- a/src/mod_user/detail/index.tsx +++ b/src/game_pages/detail/index.tsx @@ -167,7 +167,7 @@ const SharePopup = forwardRef( // useShareAppMessage(() => { // return { // title: '分享', - // path: `/mod_user/detail/index?id=${id}&from=share`, + // path: `/game_pages/detail/index?id=${id}&from=share`, // } // }) // } @@ -176,7 +176,7 @@ const SharePopup = forwardRef( // useShareTimeline(() => { // return { // title: '分享', - // path: `/mod_user/detail/index?id=${id}&from=share`, + // path: `/game_pages/detail/index?id=${id}&from=share`, // } // }) // } @@ -279,7 +279,7 @@ function StickyButton(props) { const res = await OrderService.getUnpaidOrder(id); if (res.code === 0) { Taro.navigateTo({ - url: `/mod_user/orderDetail/index?id=${res.data.order_info.order_id}`, + url: `/order_pages/orderDetail/index?id=${res.data.order_info.order_id}`, }); } }, @@ -1028,7 +1028,7 @@ function Index() { const handleJoinGame = () => { Taro.navigateTo({ - url: `/mod_user/orderDetail/index?gameId=${id}`, + url: `/order_pages/orderDetail/index?gameId=${id}`, }); }; diff --git a/src/mod_user/pages/myself/index.tsx b/src/mod_user/pages/myself/index.tsx index e038315..7534305 100644 --- a/src/mod_user/pages/myself/index.tsx +++ b/src/mod_user/pages/myself/index.tsx @@ -130,14 +130,14 @@ const MyselfPage: React.FC = () => { // 处理球局订单 const handle_game_orders = () => { Taro.navigateTo({ - url: "/mod_user/orderList/index", + url: "/order_pages/orderList/index", }); }; // 处理收藏 const handle_favorites = () => { Taro.navigateTo({ - url: "/mod_user/favorites/index", + url: "/other_pages/favorites/index", }); }; diff --git a/src/mod_user/pages/other/index.tsx b/src/mod_user/pages/other/index.tsx index 9f4b97a..9d0e646 100644 --- a/src/mod_user/pages/other/index.tsx +++ b/src/mod_user/pages/other/index.tsx @@ -105,7 +105,7 @@ const OtherUserPage: React.FC = () => { // 处理球局详情 const handle_game_detail = (game_id: string) => { Taro.navigateTo({ - url: `/mod_user/detail/index?id=${game_id}&from=personal`, + url: `/game_pages/detail/index?id=${game_id}&from=personal`, }); }; diff --git a/src/mod_user/orderDetail/config.ts b/src/order_pages/orderDetail/config.ts similarity index 100% rename from src/mod_user/orderDetail/config.ts rename to src/order_pages/orderDetail/config.ts diff --git a/src/mod_user/orderDetail/index.config.ts b/src/order_pages/orderDetail/index.config.ts similarity index 100% rename from src/mod_user/orderDetail/index.config.ts rename to src/order_pages/orderDetail/index.config.ts diff --git a/src/mod_user/orderDetail/index.module.scss b/src/order_pages/orderDetail/index.module.scss similarity index 100% rename from src/mod_user/orderDetail/index.module.scss rename to src/order_pages/orderDetail/index.module.scss diff --git a/src/mod_user/orderDetail/index.tsx b/src/order_pages/orderDetail/index.tsx similarity index 100% rename from src/mod_user/orderDetail/index.tsx rename to src/order_pages/orderDetail/index.tsx diff --git a/src/mod_user/orderList/index.config.ts b/src/order_pages/orderList/index.config.ts similarity index 100% rename from src/mod_user/orderList/index.config.ts rename to src/order_pages/orderList/index.config.ts diff --git a/src/mod_user/orderList/index.module.scss b/src/order_pages/orderList/index.module.scss similarity index 100% rename from src/mod_user/orderList/index.module.scss rename to src/order_pages/orderList/index.module.scss diff --git a/src/mod_user/orderList/index.tsx b/src/order_pages/orderList/index.tsx similarity index 99% rename from src/mod_user/orderList/index.tsx rename to src/order_pages/orderList/index.tsx index 5a7049d..070b52b 100644 --- a/src/mod_user/orderList/index.tsx +++ b/src/order_pages/orderList/index.tsx @@ -144,7 +144,7 @@ const OrderList = () => { function handleViewOrderDetail(orderId) { Taro.navigateTo({ - url: `/mod_user/orderDetail/index?id=${orderId}`, + url: `/order_pages/orderDetail/index?id=${orderId}`, }); } diff --git a/src/mod_user/favorites/index.config.ts b/src/other_pages/favorites/index.config.ts similarity index 100% rename from src/mod_user/favorites/index.config.ts rename to src/other_pages/favorites/index.config.ts diff --git a/src/mod_user/favorites/index.scss b/src/other_pages/favorites/index.scss similarity index 100% rename from src/mod_user/favorites/index.scss rename to src/other_pages/favorites/index.scss diff --git a/src/mod_user/favorites/index.tsx b/src/other_pages/favorites/index.tsx similarity index 100% rename from src/mod_user/favorites/index.tsx rename to src/other_pages/favorites/index.tsx diff --git a/src/mod_user/message/index.config.ts b/src/other_pages/message/index.config.ts similarity index 100% rename from src/mod_user/message/index.config.ts rename to src/other_pages/message/index.config.ts diff --git a/src/mod_user/message/index.scss b/src/other_pages/message/index.scss similarity index 100% rename from src/mod_user/message/index.scss rename to src/other_pages/message/index.scss diff --git a/src/mod_user/message/index.tsx b/src/other_pages/message/index.tsx similarity index 100% rename from src/mod_user/message/index.tsx rename to src/other_pages/message/index.tsx diff --git a/src/mod_user/ntrp-evaluate/index.config.ts b/src/other_pages/ntrp-evaluate/index.config.ts similarity index 100% rename from src/mod_user/ntrp-evaluate/index.config.ts rename to src/other_pages/ntrp-evaluate/index.config.ts diff --git a/src/mod_user/ntrp-evaluate/index.module.scss b/src/other_pages/ntrp-evaluate/index.module.scss similarity index 100% rename from src/mod_user/ntrp-evaluate/index.module.scss rename to src/other_pages/ntrp-evaluate/index.module.scss diff --git a/src/mod_user/ntrp-evaluate/index.tsx b/src/other_pages/ntrp-evaluate/index.tsx similarity index 100% rename from src/mod_user/ntrp-evaluate/index.tsx rename to src/other_pages/ntrp-evaluate/index.tsx diff --git a/src/pages/publishBall/index.tsx b/src/pages/publishBall/index.tsx index 32bc6aa..7542962 100644 --- a/src/pages/publishBall/index.tsx +++ b/src/pages/publishBall/index.tsx @@ -308,7 +308,7 @@ const PublishBall: React.FC = () => { // 如果是畅打,则跳转第一个球局详情页,并自动分享 @刘杰 Taro.navigateTo({ // @ts-expect-error: id - url: `/mod_user/detail/index?id=${res.data.id || 1}&from=publish`, + url: `/game_pages/detail/index?id=${res.data.id || 1}&from=publish`, }); } else { Taro.showToast({ @@ -361,7 +361,7 @@ const PublishBall: React.FC = () => { // 如果是畅打,则跳转第一个球局详情页,并自动分享 @刘杰 Taro.navigateTo({ // @ts-expect-error: id - url: `/mod_user/detail/index?id=${res.data?.[0].id || 1}&from=publish`, + url: `/game_pages/detail/index?id=${res.data?.[0].id || 1}&from=publish`, }); } else { Taro.showToast({