修改用户登陆认证流程

This commit is contained in:
张成
2025-11-16 23:55:49 +08:00
parent 5f8fb9b1b3
commit abbfc27479
12 changed files with 229 additions and 99 deletions

View File

@@ -10,6 +10,7 @@ import * as LoginService from "@/services/loginService";
import { getCurrentLocation } from "@/utils/locationUtils";
import { useUserInfo, useUserActions } from "@/store/userStore";
import { useGlobalState } from "@/store/global";
import { requireLoginWithPhone } from "@/utils/helper";
import GameTags from "./components/GameTags";
import Carousel from "./components/Carousel";
import StickyBottom from "./components/StickyBottom";
@@ -112,6 +113,11 @@ function Index() {
}
const handleJoinGame = async () => {
// 检查登录状态和手机号
if (!requireLoginWithPhone()) {
return; // 未登录或未绑定手机号,已跳转到登录页
}
if (isMyOwn) {
const res = await DetailService.organizerJoin(Number(id));
if (res.code === 0) {
@@ -274,6 +280,4 @@ function Index() {
);
}
// export default withAuth(Index);
const ExportPage = withAuth(Index);
export default ExportPage;
export default Index;

View File

@@ -606,4 +606,4 @@ const ListPage = () => {
);
};
export default withAuth(ListPage);
export default ListPage;