From 6e0cf6c90a6046ade38730a18b3e4c6f997104e3 Mon Sep 17 00:00:00 2001 From: zhangds Date: Thu, 27 Oct 2022 16:33:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=90=A5=E9=94=80?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=85=91=E6=8D=A2=E7=A0=81=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UseCouponAddEdit/index.jsx | 2 ++ src/components/UseExchangeAddEdit/index.jsx | 4 +++- src/pages/plan/add/edit.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/UseCouponAddEdit/index.jsx b/src/components/UseCouponAddEdit/index.jsx index daa73036..d46796f1 100644 --- a/src/components/UseCouponAddEdit/index.jsx +++ b/src/components/UseCouponAddEdit/index.jsx @@ -506,6 +506,7 @@ const UseCouponAddEdit = forwardRef((props, ref) => { validator = true; } else { validator = false; + return validator; } // ε‘ζ”Ύθ§„εˆ™ @@ -514,6 +515,7 @@ const UseCouponAddEdit = forwardRef((props, ref) => { validator = true; } else { validator = false; + return validator; } if (validator) { diff --git a/src/components/UseExchangeAddEdit/index.jsx b/src/components/UseExchangeAddEdit/index.jsx index eae73a54..bb666017 100644 --- a/src/components/UseExchangeAddEdit/index.jsx +++ b/src/components/UseExchangeAddEdit/index.jsx @@ -186,18 +186,20 @@ const UseExchangeAddEdit = forwardRef((props, ref) => { const submit = () => { let validator = false; - if (codeInfoEl.current.validator()) { validator = true; } else { validator = false; + return validator; } if (codeRuleEl.current.validator()) { validator = true; } else { validator = false; + return validator; } + if (validator) { if (state.rank.length > 0) { let arr = state.tableData.filter((item) => item.checked); diff --git a/src/pages/plan/add/edit.js b/src/pages/plan/add/edit.js index 27a1db27..4ed149a8 100644 --- a/src/pages/plan/add/edit.js +++ b/src/pages/plan/add/edit.js @@ -233,7 +233,7 @@ export default class add extends React.Component { } async onNextStep() { if (this.state.curstep >= 1) { - if ((await this.refs.step1.submit()) == true) { + if (await this.refs.step1.submit()) { this.setState({ isload: true }); this.setState({ curstep: 2 }); } else {