From 13a54a3e29e7b55f6cbd5f3196aa45cd48044bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Wed, 13 Apr 2022 17:21:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=8A=A5=E5=90=8D=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=BA=8C=E7=BA=A7=E7=A1=AE=E8=AE=A4=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/glcc/apply/index.jsx | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/glcc/apply/index.jsx b/src/glcc/apply/index.jsx index 2f0f9f50..de6e3353 100644 --- a/src/glcc/apply/index.jsx +++ b/src/glcc/apply/index.jsx @@ -10,7 +10,7 @@ const Option = Select.Option; function Apply(props) { const {form, current_user, showNotification, isGlccApplyDate} = props; // 可用于开发时不同账号报名 - // current_user && (current_user.user_id = 1) + // current_user && (current_user.user_id = 6) // current_user && (current_user.userName = "创新使者") const {getFieldDecorator, validateFields, setFieldsValue, validateFieldsAndScroll } = form; const [reload, setReload] = useState(undefined); @@ -29,6 +29,8 @@ function Apply(props) { ); useEffect(()=>{ + // 进入此页面置顶 + window.scrollTo(0,0); if(!isGlccApplyDate){ // 不在开源夏令营报名时间之内 window.location.href="/glcc"; @@ -72,16 +74,22 @@ function Apply(props) { e.preventDefault(); validateFieldsAndScroll((err, values) => { if (!err) { - const params ={ - ...values, - projectLogoId: values.logo.file.response.data.id, - userId: current_user.user_id, - userName: current_user.username - } - applyGlcc(params).then(response=>{ - if(response && response.message === "success"){ - showNotification("报名成功"); - setReload(Math.random()); + Modal.confirm({ + title: "报名", + content: "确定提交报名信息,提交后报名信息将无法修改", + onOk: ()=>{ + const params ={ + ...values, + projectLogoId: values.logo.file.response.data.id, + userId: current_user.user_id, + userName: current_user.username + } + applyGlcc(params).then(response=>{ + if(response && response.message === "success"){ + showNotification("报名成功"); + setReload(Math.random()); + } + }) } })} });