From 1a5b64ce162e4f3ead94dab1e5381b0adf9b829b Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Wed, 26 Jan 2022 10:56:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E9=A2=84=E8=A7=88=E6=9B=B4?= =?UTF-8?q?=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangepage/edittemplate/main.js | 18 +++++++++--------- src/pages/exchangepage/template/main.js | 2 +- src/pages/exchangepage/template/preview.js | 2 -- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js index af5fee54..2103076f 100644 --- a/src/pages/exchangepage/edittemplate/main.js +++ b/src/pages/exchangepage/edittemplate/main.js @@ -98,12 +98,14 @@ getLandingdata(val){ let pageChange=sessionStorage.getItem('pageChange'); if(myInfoData) { + let template=myInfoData.page; + this.setState({showType:Number(myInfoData.page)}); let newEditor=_.clone(myInfoData); if(typePage){ this.setState({showType:Number(typePage)}); - }else{ - this.setState({showType:Number(myInfoData.page)}); + template=typePage; } + console.log(107,typePage); let exchangeList=newEditor.exchange; exchangeList['land'].title=newEditor.title; exchangeList['land'].sort=newEditor.sort; @@ -112,14 +114,12 @@ getLandingdata(val){ whiteList['land'].sort=newEditor.sort; newEditor.exchangeList=exchangeList; newEditor.whiteList=whiteList; - if(mouldType==0){ - if(this.state.showType==1){ + if(mouldType==0){//系统模板 this.setState({model:newEditor.whiteList.land,product_list:newEditor.whiteList.product_list,product_detail:newEditor.whiteList.product_detail}); - }else{ - this.setState({model:newEditor.exchangeList.land,product_list:newEditor.exchangeList.product_list,product_detail:newEditor.exchangeList.product_detail}); - } - }else{ - if(this.state.showType==1){ + }else{//落地页模板&我的模板(只有一套) + + console.log(119,template); + if(template==1){ this.setState({model:newEditor.whiteList.land,product_list:newEditor.whiteList.product_list,product_detail:newEditor.whiteList.product_detail}); }else{ this.setState({model:newEditor.exchangeList.land,product_list:newEditor.exchangeList.product_list,product_detail:newEditor.exchangeList.product_detail}); diff --git a/src/pages/exchangepage/template/main.js b/src/pages/exchangepage/template/main.js index 118104b0..4b9568ee 100644 --- a/src/pages/exchangepage/template/main.js +++ b/src/pages/exchangepage/template/main.js @@ -240,7 +240,7 @@ export default class mytemplate extends React.Component{ onPreview(row){ let rowdata={}; let exchangedata={} - this.setState({moudleData:row,showPage:1}); + this.setState({moudleData:row,showPage:1,pageStep:1}); rowdata.model=row.access_conf.land; rowdata.product_list=row.access_conf.product_list; rowdata.product_detail=row.access_conf.product_detail; diff --git a/src/pages/exchangepage/template/preview.js b/src/pages/exchangepage/template/preview.js index 2601bdb1..aabc1f37 100644 --- a/src/pages/exchangepage/template/preview.js +++ b/src/pages/exchangepage/template/preview.js @@ -49,9 +49,7 @@ export default class acclist extends React.Component{ } render(){ - let propsData=this.props.data; - console.log('预览', this.props); return(