Skip to content

Commit 400b5b0

Browse files
committed
fix: removed number of applicaitons
1 parent 0267155 commit 400b5b0

File tree

2 files changed

+1
-86
lines changed

2 files changed

+1
-86
lines changed

src/pages/formM/index.tsx

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,6 @@ const FormForMobile: React.FC = () => {
3636
const [extra_question, setextra_question] = useState(''); //额外问题
3737
const [formSetted, setformSetted] = useState(false);
3838
const [form_id, setform_id] = useState('');
39-
const chineseDict: { [key: string]: string } = {
40-
male: '男生',
41-
female: '女生',
42-
Android: '安卓组',
43-
Backend: '后端组',
44-
Design: '设计组',
45-
Frontend: '前端组',
46-
Product: '产品组',
47-
};
4839
const turnNext = () => {
4940
setPageNum(pageNum + 1); //换页函数
5041
};
@@ -318,35 +309,6 @@ const FormForMobile: React.FC = () => {
318309
}
319310
};
320311

321-
interface getGroupNumProps {
322-
code: number;
323-
data: {
324-
number: number;
325-
};
326-
}
327-
328-
const [groupNum, setGroupNum] = useState(0);
329-
const getGroupNums = () => {
330-
if (wantGroup !== '') {
331-
post('/form/group/applicant-number', {
332-
group: wantGroup,
333-
year: 2023,
334-
season: 'autumn',
335-
}).then(
336-
(r: getGroupNumProps) => {
337-
const { number } = r.data;
338-
setGroupNum(number);
339-
},
340-
(e) => {
341-
void message.error(`获取当前组已报人数失败,请稍后重试`);
342-
console.error(e);
343-
},
344-
);
345-
}
346-
};
347-
348-
useEffect(getGroupNums, [wantGroup]);
349-
350312
const [isPastDeadline, setIsPastDeadline] = useState(false);
351313

352314
useEffect(() => {
@@ -711,13 +673,6 @@ const FormForMobile: React.FC = () => {
711673
<Select.Option value="Backend">后端组</Select.Option>
712674
<Select.Option value="Android">安卓组</Select.Option>
713675
</Select>
714-
{wantGroup !== '' ? (
715-
<div className={'groupNums_M'}>
716-
{chineseDict[wantGroup]}已报人数:{groupNum}
717-
</div>
718-
) : (
719-
''
720-
)}
721676
</div>
722677
<div className="term_detail_box_formM">
723678
<div className="yellowBot"></div>

src/pages/formW/index.tsx

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -311,36 +311,6 @@ const FormForWeb: React.FC = () => {
311311
void message.info('邮箱请在个人主页修改');
312312
// eslint-disable-next-line react-hooks/exhaustive-deps
313313
}, [contactWayselect2]);
314-
315-
interface getGroupNumProps {
316-
code: number;
317-
data: {
318-
number: number;
319-
};
320-
}
321-
322-
const [groupNum, setGroupNum] = useState(0);
323-
const getGroupNums = () => {
324-
if (wantGroup !== '') {
325-
post('/form/group/applicant-number', {
326-
group: wantGroup,
327-
year: 2023,
328-
season: 'autumn',
329-
}).then(
330-
(r: getGroupNumProps) => {
331-
const { number } = r.data;
332-
setGroupNum(number);
333-
},
334-
(e) => {
335-
void message.error(`获取当前组已报人数失败,请稍后重试`);
336-
console.error(e);
337-
},
338-
);
339-
}
340-
};
341-
342-
useEffect(getGroupNums, [wantGroup]);
343-
344314
const [isPastDeadline, setIsPastDeadline] = useState(false);
345315

346316
useEffect(() => {
@@ -705,17 +675,7 @@ const FormForWeb: React.FC = () => {
705675
</Space>
706676
)}
707677
</div>
708-
{!form_id ? (
709-
wantGroup !== '' ? (
710-
<div className={'groupNums'}>
711-
{chineseDict[wantGroup]}已报人数:{groupNum}
712-
</div>
713-
) : (
714-
''
715-
)
716-
) : (
717-
''
718-
)}
678+
719679
<div className="reasonbox">
720680
<div className="detail_formweb">心动理由:</div>
721681
<TextArea

0 commit comments

Comments
 (0)