更改模板分类传值
This commit is contained in:
parent
054e12ce5e
commit
6d44944964
|
@ -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: "",
|
||||
|
|
|
@ -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,31 +121,11 @@ 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(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){
|
||||
|
|
Loading…
Reference in New Issue