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});