From 6d44944964fcf38e488fb39a8f4c349e50a84a62 Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Wed, 26 Jan 2022 13:59:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=A8=A1=E6=9D=BF=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E4=BC=A0=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exchangepage/edittemplate/landingPage.js | 4 +-- src/pages/exchangepage/edittemplate/main.js | 33 ++++--------------- 2 files changed, 7 insertions(+), 30 deletions(-) diff --git a/src/pages/exchangepage/edittemplate/landingPage.js b/src/pages/exchangepage/edittemplate/landingPage.js index 1ccd063f..874be1a8 100644 --- a/src/pages/exchangepage/edittemplate/landingPage.js +++ b/src/pages/exchangepage/edittemplate/landingPage.js @@ -16,9 +16,7 @@ export default class edittemplate extends React.Component{ super(props) this.state={ isSystemModel:false, - mouldWay:[{ key:0,text:'节日'},{ key:1,text:'通用'},{ key:2,text:'银行'} - ,{ key:3,text:'运动'},{ key:4,text:'汽车'} - ], + mouldWay:[], model:{ title:"落地页标题", top_image: "", diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js index dc25e9d9..8421fd3d 100644 --- a/src/pages/exchangepage/edittemplate/main.js +++ b/src/pages/exchangepage/edittemplate/main.js @@ -26,7 +26,7 @@ let model={ describe: {type:"",content :"",bg_image:''}, bg_color:"#EEEEEE", sort:1, - type_id:{ key:1,text:'通用'}, + type_id:{ key:2,text:'通用'}, font_color:"#000000", thumb:'' } @@ -113,7 +113,6 @@ getLandingdata(val){ this.setState({showType:Number(typePage)}); template=typePage; } - console.log(107,typePage); let exchangeList=newEditor.exchange; exchangeList['land'].title=newEditor.title; exchangeList['land'].sort=newEditor.sort; @@ -122,32 +121,12 @@ getLandingdata(val){ whiteList['land'].sort=newEditor.sort; newEditor.exchangeList=exchangeList; newEditor.whiteList=whiteList; - if(mouldType==0){//系统模板 - 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}); - } - }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}); - } - + 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}); } - - // if(mouldType!=0){ - // if(this.state.showType==3){//兑换码 - // this.setState({model:newEditor.exchangeList.land,product_list:newEditor.exchangeList.product_list,product_detail:newEditor.exchangeList.product_detail}); - // }else if(this.state.showType==1){ - // this.setState({model:newEditor.whiteList.land,product_list:newEditor.whiteList.product_list,product_detail:newEditor.whiteList.product_detail}); - // } - - // } - + sessionStorage.setItem('editorConfig',JSON.stringify(newEditor)); if(mouldType!=0&&pageChange==1){ this.setState({pagedisable:true});