From 8dd666768f9d40a1367cf929f57c03c5a8ead3ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Mon, 10 Jan 2022 18:20:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=91=E6=8D=A2=E7=A0=81=E5=95=86=E5=93=81?= =?UTF-8?q?=E6=9A=82=E6=97=B6=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/plan/add/edit.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/pages/plan/add/edit.js b/src/pages/plan/add/edit.js index 08cb0104..c228e617 100644 --- a/src/pages/plan/add/edit.js +++ b/src/pages/plan/add/edit.js @@ -44,6 +44,7 @@ export default class add extends React.Component{ timer:3, theme_options:[], isload:false, + is_Edit:false, } } @@ -238,13 +239,8 @@ export default class add extends React.Component{ { temp.push(data) - console.log("key的数据") - console.log(temp) - } else{ - - console.log(7777) return; } @@ -262,8 +258,6 @@ export default class add extends React.Component{ await addPlanStep(plan_id,obj).then((res)=>{ handelResponse(res,(req,msg)=>{ this.setState({curstep:3}) - - console.log("第二部") sessionStorage.setItem("step2", JSON.stringify(temp)) this.setState({card_visible:true}) return; @@ -274,7 +268,6 @@ export default class add extends React.Component{ } - console.log("第三部") if(this.state.curstep == 3){ let data = this.refs.step3.submit(); @@ -297,7 +290,6 @@ export default class add extends React.Component{ getReseller(id).then((res)=>{ handelResponse(res,(req,msg)=>{ - console.log("分销商数据",req) this.setState({reseller:req}) this.setState({phone_list:req.contact_phone}) @@ -391,12 +383,20 @@ export default class add extends React.Component{ } async onEditInfo(){ + let plan_id = sessionStorage.getItem("plan_id") - if( await this.refs.step1.submit(plan_id)) + if( !this.state.is_Edit) { + console.log("是否编辑",this.state.is_Edit) + this.setState({is_Edit:true}) + if(await this.refs.step1.submit(plan_id)) + { + setTimeout(()=>{ this.props.history.push('/home/plan-list/'); + this.setState({is_Edit:false}) },1500) + } } } onConfirm(e){