Merge branch 'white_line' of codeup.aliyun.com:5f9118049cffa29cfdd3be1c/marketing/frontend into white_line

This commit is contained in:
姜棚 2022-01-21 09:40:55 +08:00
commit 362ac8ee04
3 changed files with 24 additions and 6 deletions

View File

@ -88,6 +88,7 @@ getLandingdata(val){
sessionStorage.removeItem('editorConfig');
let myInfoData = JSON.parse(sessionStorage.getItem("pageInfo"))
let mouldType=sessionStorage.getItem('mouldType');
this.setState({mouldType});
let pageChange=sessionStorage.getItem('pageChange');
if(myInfoData)
{
@ -106,7 +107,10 @@ getLandingdata(val){
}else{
if(myInfoData.page==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){
@ -382,6 +386,11 @@ getLandingdata(val){
this.setState({model:whiteData.land});
this.setState({product_list:whiteData.product_list});
this.setState({product_detail:whiteData.product_detail});
if(this.state.mouldType==0){
let whiteLand=whiteData.land;
whiteLand.title=this.state.model.title;
this.setState({model:whiteLand});
}
}else if(e.target.value==3){
let exchangeData=editorData.exchangeList;
this.setState({model:exchangeData.land});
@ -737,7 +746,7 @@ getLandingdata(val){
</div>
{
this.state.showType==3?this.state.activeNavStatus==1?<LandingForm settitle={(c)=>this.getTitle(c)} landbgcolor={(c)=>this.getlandbgcolor(c)} landftcolor={(c)=>this.getlandftcolor(c)} setbanner={(e)=>this.getLandingdata(e)} />:this.state.activeNavStatus==2?<GoodsForm setactiveType={c=>this.getactiveTypeFn(c)} seteditorHtml={c=>this.getEditorHtmlFn(c)} setButtonbgcolor={(c)=>{this.getButtonbgcolor(c)}} setButtoncolor={(c)=>{this.getButtoncolor(c)}} setbottomImg={c=>this.getgoodsbottomimgFn(c)} setbanner={(c)=>this.getGoodsbanner(c)} setarrayType={(c)=>this.getarrayType(c)}/>:<DetailsPage seteditorHtml={c=>this.getdetailEditorHtmlFn(c)} setdetailActive={c=>this.getdetailActiveFn(c)} setdetailbgc={c=>{this.getdetailbgcolor(c)}} setbottomImg={c=>this.getbottomimgFn(c)} setdetailftc={c=>this.getdetailfont_color(c)}/>
:this.state.activeNavStatus==1?<WhiteLand settitle={(c)=>this.getTitle(c)} landbgcolor={(c)=>this.getlandbgcolor(c)} landftcolor={(c)=>this.getlandftcolor(c)} setbanner={(e)=>this.getLandingdata(e)} />:this.state.activeNavStatus==2?<Whitegoods setactiveType={c=>this.getactiveTypeFn(c)} seteditorHtml={c=>this.getEditorHtmlFn(c)} setButtonbgcolor={(c)=>{this.getButtonbgcolor(c)}} setButtoncolor={(c)=>{this.getButtoncolor(c)}} setbottomImg={c=>this.getgoodsbottomimgFn(c)} setbanner={(c)=>this.getGoodsbanner(c)} setarrayType={(c)=>this.getarrayType(c)}/>:<Whitedetails seteditorHtml={c=>this.getdetailEditorHtmlFn(c)} setdetailActive={c=>this.getdetailActiveFn(c)} setdetailbgc={c=>{this.getdetailbgcolor(c)}} setbottomImg={c=>this.getbottomimgFn(c)} setdetailftc={c=>this.getdetailfont_color(c)}/>}
:this.state.activeNavStatus==1?<WhiteLand settitle={(c)=>this.getTitle(c)} mouldType={this.state.mouldType} landbgcolor={(c)=>this.getlandbgcolor(c)} landftcolor={(c)=>this.getlandftcolor(c)} setbanner={(e)=>this.getLandingdata(e)} />:this.state.activeNavStatus==2?<Whitegoods setactiveType={c=>this.getactiveTypeFn(c)} seteditorHtml={c=>this.getEditorHtmlFn(c)} setButtonbgcolor={(c)=>{this.getButtonbgcolor(c)}} setButtoncolor={(c)=>{this.getButtoncolor(c)}} setbottomImg={c=>this.getgoodsbottomimgFn(c)} setbanner={(c)=>this.getGoodsbanner(c)} setarrayType={(c)=>this.getarrayType(c)}/>:<Whitedetails seteditorHtml={c=>this.getdetailEditorHtmlFn(c)} setdetailActive={c=>this.getdetailActiveFn(c)} setdetailbgc={c=>{this.getdetailbgcolor(c)}} setbottomImg={c=>this.getbottomimgFn(c)} setdetailftc={c=>this.getdetailfont_color(c)}/>}
{
this.state.preview_visible ? (
<div>

View File

@ -36,13 +36,19 @@ export default class edittemplate extends React.Component{
let self=this;
let config=JSON.parse(sessionStorage.getItem('editorConfig'));
let moudTyle=sessionStorage.getItem('mouldType');
if(moudTyle&&moudTyle==0){
this.setState({isSystemModel:true});
}
if(config&&config.whiteList&&config.whiteList.land){
let data=config.whiteList.land;
this.setState({model:data});
}
if(moudTyle&&moudTyle==0){
this.setState({isSystemModel:true});
let data=config.whiteList.land;
data.title=config.exchangeList.land.title;
this.setState({model:data});
}
getThemeType().then(res=>{
handelResponse(res,(req,msg)=>{
let typeListSource=res.data.map(it=>{
@ -246,18 +252,21 @@ export default class edittemplate extends React.Component{
render(){
console.log('白名单',this.state);
return(
<div style={{width:"92%","margin":"0 auto 60px","overflow":"auto", "maxHeight":"100%"}}>
<div style={{fontWeight:'bold'}}>基础设置</div>
<Form model={this.state.model} ref="form1">
<FormItem labelname="落地页标题:" prop="title" id="title" labelwidth="100px">
{
<FormItem labelname="落地页标题:" prop="title" id="title" labelwidth="100px">
<Ipt onChange={(e)=>{
let model2 = this.state.model;
model2.title = e;
this.setState({model:model2})
this.props.settitle(e)
}}
disabled={this.props.mouldType==0}
onClearItem={(e)=>{
let model2 = this.state.model;
model2.title = "";
@ -265,6 +274,7 @@ export default class edittemplate extends React.Component{
}}
value={this.state.model.title} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'300px'} alignment={'left'}/>
</FormItem>
}
<div style={{marginTop:'20px',marginBottom:'15px',fontWeight:'bold'}}>样式</div>
<FormItem labelname="背景颜色:" prop="font_color" id="font_color" labelwidth="80px">
<div className="colorItembg dfleac">

View File

@ -172,7 +172,6 @@ export default class mytemplate extends React.Component{
sessionStorage.setItem("pageInfo", JSON.stringify(row))
sessionStorage.setItem("isSort",0)
sessionStorage.setItem('mouldType',1);
console.log(88888,self.state.sourceIndex);
sessionStorage.setItem('pageChange',0);