From 1e8ae1bcb8acd1c23731b124d9dfd7b2e1fc4da9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sun, 8 Mar 2020 23:52:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E6=96=AD=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/redux/actions/ojForm.js | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/public/react/src/redux/actions/ojForm.js b/public/react/src/redux/actions/ojForm.js index 62de0fed8..29e2ac13f 100644 --- a/public/react/src/redux/actions/ojForm.js +++ b/public/react/src/redux/actions/ojForm.js @@ -222,38 +222,52 @@ export const validateOjForm = (props, type, cb) => { } - try { + let boolflad=false; + try { if(ojForm.sub_discipline_id.length===0){ hasSuccess = false; notification['error']({ message: '提示', description: '课程必须选择!' }); - + boolflad=true; }else if(ojForm.timeLimit===null){ hasSuccess = false; notification['error']({ message: '提示', description: '时间限制必须输入!' }); - } else if(ojForm.name.length===0){ + boolflad=true; + + } else if(ojForm.name.length===0){ hasSuccess = false; notification['error']({ message: '提示', description: '任务名称必须输入!' }); - + boolflad=true; }else if(ojForm.description.length===0){ hasSuccess = false; notification['error']({ message: '提示', description: '描述必须输入!' }); - } + boolflad=true; + } }catch (e) { } + try { + if( hasSuccess === false){ + if(boolflad===true){ + props.changeSubmitLoadingStatus(false); + } + } + }catch (e) { + + } +