修改用户登陆认证流程
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user