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'); sessionStorage.removeItem('editorConfig');
let myInfoData = JSON.parse(sessionStorage.getItem("pageInfo")) let myInfoData = JSON.parse(sessionStorage.getItem("pageInfo"))
let mouldType=sessionStorage.getItem('mouldType'); let mouldType=sessionStorage.getItem('mouldType');
this.setState({mouldType});
let pageChange=sessionStorage.getItem('pageChange'); let pageChange=sessionStorage.getItem('pageChange');
if(myInfoData) if(myInfoData)
{ {
@ -106,7 +107,10 @@ getLandingdata(val){
}else{ }else{
if(myInfoData.page==1){ if(myInfoData.page==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{
this.setState({model:newEditor.exchangeList.land,product_list:newEditor.exchangeList.product_list,product_detail:newEditor.exchangeList.product_detail});
} }
} }
// if(mouldType!=0){ // if(mouldType!=0){
@ -382,6 +386,11 @@ getLandingdata(val){
this.setState({model:whiteData.land}); this.setState({model:whiteData.land});
this.setState({product_list:whiteData.product_list}); this.setState({product_list:whiteData.product_list});
this.setState({product_detail:whiteData.product_detail}); 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){ }else if(e.target.value==3){
let exchangeData=editorData.exchangeList; let exchangeData=editorData.exchangeList;
this.setState({model:exchangeData.land}); this.setState({model:exchangeData.land});
@ -737,7 +746,7 @@ getLandingdata(val){
</div> </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.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 ? ( this.state.preview_visible ? (
<div> <div>

View File

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