模板预览更改bug

This commit is contained in:
red-deng-deng 2022-01-26 10:56:26 +08:00
parent 1b8ff043a2
commit 1a5b64ce16
3 changed files with 10 additions and 12 deletions

View File

@ -98,12 +98,14 @@ getLandingdata(val){
let pageChange=sessionStorage.getItem('pageChange'); let pageChange=sessionStorage.getItem('pageChange');
if(myInfoData) if(myInfoData)
{ {
let template=myInfoData.page;
this.setState({showType:Number(myInfoData.page)});
let newEditor=_.clone(myInfoData); let newEditor=_.clone(myInfoData);
if(typePage){ if(typePage){
this.setState({showType:Number(typePage)}); this.setState({showType:Number(typePage)});
}else{ template=typePage;
this.setState({showType:Number(myInfoData.page)});
} }
console.log(107,typePage);
let exchangeList=newEditor.exchange; let exchangeList=newEditor.exchange;
exchangeList['land'].title=newEditor.title; exchangeList['land'].title=newEditor.title;
exchangeList['land'].sort=newEditor.sort; exchangeList['land'].sort=newEditor.sort;
@ -112,14 +114,12 @@ getLandingdata(val){
whiteList['land'].sort=newEditor.sort; whiteList['land'].sort=newEditor.sort;
newEditor.exchangeList=exchangeList; newEditor.exchangeList=exchangeList;
newEditor.whiteList=whiteList; newEditor.whiteList=whiteList;
if(mouldType==0){ if(mouldType==0){//系统模板
if(this.state.showType==1){
this.setState({model:newEditor.whiteList.land,product_list:newEditor.whiteList.product_list,product_detail:newEditor.whiteList.product_detail}); this.setState({model:newEditor.whiteList.land,product_list:newEditor.whiteList.product_list,product_detail:newEditor.whiteList.product_detail});
}else{ }else{//落地页模板&我的模板(只有一套)
this.setState({model:newEditor.exchangeList.land,product_list:newEditor.exchangeList.product_list,product_detail:newEditor.exchangeList.product_detail});
} console.log(119,template);
}else{ if(template==1){
if(this.state.showType==1){
this.setState({model:newEditor.whiteList.land,product_list:newEditor.whiteList.product_list,product_detail:newEditor.whiteList.product_detail}); this.setState({model:newEditor.whiteList.land,product_list:newEditor.whiteList.product_list,product_detail:newEditor.whiteList.product_detail});
}else{ }else{
this.setState({model:newEditor.exchangeList.land,product_list:newEditor.exchangeList.product_list,product_detail:newEditor.exchangeList.product_detail}); this.setState({model:newEditor.exchangeList.land,product_list:newEditor.exchangeList.product_list,product_detail:newEditor.exchangeList.product_detail});

View File

@ -240,7 +240,7 @@ export default class mytemplate extends React.Component{
onPreview(row){ onPreview(row){
let rowdata={}; let rowdata={};
let exchangedata={} let exchangedata={}
this.setState({moudleData:row,showPage:1}); this.setState({moudleData:row,showPage:1,pageStep:1});
rowdata.model=row.access_conf.land; rowdata.model=row.access_conf.land;
rowdata.product_list=row.access_conf.product_list; rowdata.product_list=row.access_conf.product_list;
rowdata.product_detail=row.access_conf.product_detail; rowdata.product_detail=row.access_conf.product_detail;

View File

@ -49,9 +49,7 @@ export default class acclist extends React.Component{
} }
render(){ render(){
let propsData=this.props.data; let propsData=this.props.data;
console.log('预览', this.props);
return( return(
<div className="preview-show"> <div className="preview-show">
<div id="preview-bg"> <div id="preview-bg">