feat: 将list相关的代码迁移到game_pages目录

This commit is contained in:
2025-09-12 15:36:09 +08:00
parent 859ffec852
commit 7c16f8bcce
19 changed files with 40 additions and 40 deletions

View File

@@ -57,7 +57,7 @@ npm run build:alipay # 支付宝小程序
## 页面路由
- `/pages/list/index` - 首页
- `/game_pages/list/index` - 首页
- `/pages/publish/publish` - 原发布页面
- `/pages/publishBall/publishBall` - 新的约球发布页面 ⭐
- `/pages/dynamicFormDemo/dynamicFormDemo` - 动态表单演示页面 ⭐

View File

@@ -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') })
// }))
// }

View File

@@ -37,7 +37,7 @@ const ListHeader = (props: IProps) => {
const handleInputClick = () => {
Taro.navigateTo({
url: "/pages/search/index",
url: "/game_pages/search/index",
});
}

View File

@@ -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", // 列表页
});
};

View File

@@ -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();

View File

@@ -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";
@@ -159,7 +159,7 @@ const ListPage = () => {
const handleSearchClick = () => {
Taro.navigateTo({
url: "/pages/search/index",
url: "/game_pages/search/index",
});
};

View File

@@ -101,7 +101,7 @@ const ListSearch = () => {
return;
}
Taro.navigateTo({
url: `/pages/searchResult/index`,
url: `/game_pages/searchResult/index`,
});
};

View File

@@ -324,7 +324,7 @@ const OrderCheck = () => {
<Button
type="warn"
onClick={() => {
Taro.redirectTo({ url: "/pages/list/index" });
Taro.redirectTo({ url: "/game_pages/list/index" });
}}
>

View File

@@ -16,7 +16,7 @@ const HomePage: React.FC = () => {
// 先获取用户信息
await fetchUserInfo();
// 用户信息获取成功后跳转到列表页
Taro.redirectTo({ url: '/pages/list/index' });
Taro.redirectTo({ url: '/game_pages/list/index' });
} catch (error) {
console.error('获取用户信息失败:', error);
// 如果获取用户信息失败,跳转到登录页

View File

@@ -47,7 +47,7 @@ const LoginPage: React.FC = () => {
if (redirect) {
Taro.redirectTo({ url: decodeURIComponent(redirect) });
} else {
Taro.redirectTo({ url: '/pages/list/index' });
Taro.redirectTo({ url: '/game_pages/list/index' });
}
}, 10);
} else {

View File

@@ -154,7 +154,7 @@ const VerificationPage: React.FC = () => {
}
setTimeout(() => {
Taro.redirectTo({
url: "/pages/list/index",
url: "/game_pages/list/index",
});
}, 200);
} else {
@@ -182,7 +182,7 @@ const VerificationPage: React.FC = () => {
if (res.code === 0) {
setTimeout(() => {
Taro.redirectTo({
url: "/pages/list/index",
url: "/game_pages/list/index",
});
}, 200);
} else {
@@ -353,7 +353,7 @@ const VerificationPage: React.FC = () => {
className="cancel_button"
onClick={() => {
Taro.redirectTo({
url: "/pages/list/index",
url: "/game_pages/list/index",
});
}}
>

View File

@@ -179,7 +179,7 @@ interface UserStats {
## 使用示例
查看 `src/pages/list/index.tsx` 获取完整的使用示例,包括:
查看 `src/game_pages/list/index.tsx` 获取完整的使用示例,包括:
- 用户信息展示
- 统计数据实时更新