diff --git a/app/(tourist)/regist/page.module.scss b/app/(tourist)/regist/page.module.scss index ee4ee16..8f0d3bd 100644 --- a/app/(tourist)/regist/page.module.scss +++ b/app/(tourist)/regist/page.module.scss @@ -55,14 +55,13 @@ .veriCodeInput { position: relative; input { - width: 86px; - padding: 1px 180px 1px 48px; + padding-left: 50px; } } .defaultHead { position: absolute; - top: 67px; + top: 63px; left: 0px; left: 20px; diff --git a/app/(tourist)/regist/page.tsx b/app/(tourist)/regist/page.tsx index 0dde028..62022bf 100644 --- a/app/(tourist)/regist/page.tsx +++ b/app/(tourist)/regist/page.tsx @@ -10,73 +10,73 @@ import { RegistContext } from "@/lib/context"; import PageTransition from "@/components/pageTransition"; const Regist = () => { - const [registTicket, setRegistTicket] = useState(); - const [username, setUsername] = useState(); - const [step, setStep] = useState(1); - const handleStep = useCallback((step: -1 | 1) => { - setStep((pre) => pre + step); - }, []); + const [registTicket, setRegistTicket] = useState(); + const [username, setUsername] = useState(); + const [step, setStep] = useState(1); + const handleStep = useCallback((step: -1 | 1) => { + setStep((pre) => pre + step); + }, []); - const searchParams = useSearchParams(); - // TODO 错误处理 - const redirect = searchParams.get("redirect"); - // const redirect = - // redirectParams?.split("?")[0] + - // "?" + - // JSON.parse(redirectParams?.split("?")[1] ?? "[]").join("&"); + const searchParams = useSearchParams(); + // TODO 错误处理 + const redirect = searchParams.get("redirect"); + // const redirect = + // redirectParams?.split("?")[0] + + // "?" + + // JSON.parse(redirectParams?.split("?")[1] ?? "[]").join("&"); - const handleTicket = useCallback((ticket: string) => { - setRegistTicket(ticket); - }, []); - const handleUsername = useCallback((username: string) => { - setUsername(username); - }, []); - const providerValue = { - redirect, - username: username, - registTicket: registTicket, - currentStep: step, - handleStep: handleStep, - handleTicket: handleTicket, - handleUsername: handleUsername, - }; - return ( - <> -
{""}
-
- - {step === 1 ? ( - - - - ) : ( - <> - )} - {step === 2 ? ( - - - - ) : ( - <> - )} - {step === 3 ? ( - - - - ) : ( - <> - )} - {step === 4 ? ( - - - - ) : ( - <> - )} - -
- - ); + const handleTicket = useCallback((ticket: string) => { + setRegistTicket(ticket); + }, []); + const handleUsername = useCallback((username: string) => { + setUsername(username); + }, []); + const providerValue = { + redirect, + username: username, + registTicket: registTicket, + currentStep: step, + handleStep: handleStep, + handleTicket: handleTicket, + handleUsername: handleUsername, + }; + return ( + <> +
{""}
+
+ + {step === 1 ? ( + + + + ) : ( + <> + )} + {step === 2 ? ( + + + + ) : ( + <> + )} + {step === 3 ? ( + + + + ) : ( + <> + )} + {step === 4 ? ( + + + + ) : ( + <> + )} + +
+ + ); }; export default Regist;