feat: 球局详情完善 & 订单详情完善

This commit is contained in:
2025-09-11 19:21:46 +08:00
parent c430ed407b
commit 03c2571dda
12 changed files with 856 additions and 423 deletions

View File

@@ -1,8 +1,7 @@
import React, { useEffect, useState } from 'react'
import Taro from '@tarojs/taro'
import { check_login_status } from '@/services/loginService'
import React, { useEffect, useState } from "react";
import { View } from "@tarojs/components";
import Taro from "@tarojs/taro";
import { check_login_status } from "@/services/loginService";
export function getCurrentFullPath(): string {
const pages = Taro.getCurrentPages();
@@ -31,18 +30,30 @@ export default function withAuth<P extends object>(
const is_login = check_login_status();
setAuthed(is_login);
if (!is_login) {
const currentPage = getCurrentFullPath();
// Taro.redirectTo({
// url: `/pages/login/index/index${
// currentPage ? `?redirect=${encodeURIComponent(currentPage)}` : ''
// }`,
// })
}
// if (!is_login) {
// const currentPage = getCurrentFullPath();
// Taro.redirectTo({
// url: `/pages/login/index/index${
// currentPage ? `?redirect=${encodeURIComponent(currentPage)}` : ""
// }`,
// });
// }
}, []);
// if (!authed) {
// return <View style={{ width: '100vh', height: '100vw', backgroundColor: 'white', position: 'fixed', top: 0, left: 0, zIndex: 999 }} /> // 空壳,避免 children 渲染出错
// return (
// <View
// style={{
// width: "100vh",
// height: "100vw",
// backgroundColor: "white",
// position: "fixed",
// top: 0,
// left: 0,
// zIndex: 999,
// }}
// />
// ); // 空壳,避免 children 渲染出错
// }
return <WrappedComponent {...props} />;