diff --git a/src/pages/freshman/join.astro b/src/pages/freshman/join.astro index 4ae9a36..521dcc4 100644 --- a/src/pages/freshman/join.astro +++ b/src/pages/freshman/join.astro @@ -5,6 +5,6 @@ import ReactChild from "./react/join.tsx";
- +
diff --git a/src/pages/freshman/list.astro b/src/pages/freshman/list.astro index 9704909..edf6058 100644 --- a/src/pages/freshman/list.astro +++ b/src/pages/freshman/list.astro @@ -5,6 +5,6 @@ import ReactChild from "./react/list.tsx";
- +
diff --git a/src/pages/freshman/react/join.tsx b/src/pages/freshman/react/join.tsx index 283d250..ba6d687 100644 --- a/src/pages/freshman/react/join.tsx +++ b/src/pages/freshman/react/join.tsx @@ -12,7 +12,6 @@ export default function JoinForm() { qq: "", email: "", }) - const handleChange = (e: React.ChangeEvent) => { const { name, value } = e.target setFormData(prevData => ({ @@ -20,71 +19,78 @@ export default function JoinForm() { [name]: value, })) } - const handleSubmit = async () => { try { await activeClient.freshman.postFreshmanAdd({ requestBody: formData, }) - alert("Form submitted successfully!") + alert("提交成功! 后续请加群获取!") } catch (error) { console.error("Error submitting form:", error) alert("Failed to submit form.") } } - return (
- - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + +
) } diff --git a/src/pages/freshman/react/list.tsx b/src/pages/freshman/react/list.tsx index 8349087..9ce847a 100644 --- a/src/pages/freshman/react/list.tsx +++ b/src/pages/freshman/react/list.tsx @@ -18,7 +18,7 @@ const FreshmanList = () => { list: [], total: 0, }) - const [currentPage, setCurrentPage] = useState(0) + const [currentPage] = useState(1) // setCurrentPage useEffect(() => { const fetchFreshmen = async () => { const result = await activeClient.freshman.getFreshmanList({ @@ -28,13 +28,9 @@ const FreshmanList = () => { } fetchFreshmen() }, []) - setTimeout(() => { - setCurrentPage(1) - }, 1000) return (
- {JSON.stringify(freshmen)} {freshmen.list.map(freshman => (