预览效果白名单测试

This commit is contained in:
red-deng-deng 2022-01-26 10:28:09 +08:00
parent e15133de9a
commit 932d817187
3 changed files with 22 additions and 9 deletions

View File

@ -87,7 +87,10 @@ getLandingdata(val){
componentWillMount(e){ componentWillMount(e){
let href=window.location.href; let href=window.location.href;
let strindex = href.lastIndexOf("\="); let strindex = href.lastIndexOf("\=");
let typePage = href.substr(strindex + 1, href.length); let typePage =null;
if(strindex>-1){
typePage = href.substr(strindex + 1, href.length);
}
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');
@ -95,10 +98,11 @@ getLandingdata(val){
let pageChange=sessionStorage.getItem('pageChange'); let pageChange=sessionStorage.getItem('pageChange');
if(myInfoData) if(myInfoData)
{ {
this.setState({showType: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{
this.setState({showType:Number(myInfoData.page)});
} }
let exchangeList=newEditor.exchange; let exchangeList=newEditor.exchange;
exchangeList['land'].title=newEditor.title; exchangeList['land'].title=newEditor.title;
@ -109,7 +113,11 @@ getLandingdata(val){
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});
}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});
}
}else{ }else{
if(this.state.showType==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});

View File

@ -292,7 +292,12 @@ export default class mytemplate extends React.Component{
// let link = window.location.href.replace(window.location.hash,"#/home/edittemplate"); // let link = window.location.href.replace(window.location.hash,"#/home/edittemplate");
// window.open(link, "_blank") // window.open(link, "_blank")
sessionStorage.setItem('mouldType',1); sessionStorage.setItem('mouldType',1);
window.location.href='/#/edittemplate'; // window.location.href='/#/edittemplate';
if(type){
window.location.href= "/#/edittemplate?type="+type;
}else{
window.location.href= "/#/edittemplate?type="+row.page;
}
sessionStorage.setItem('pageChange',1); sessionStorage.setItem('pageChange',1);
} }
@ -479,8 +484,8 @@ export default class mytemplate extends React.Component{
<section class="screen-size-selector"><div className={this.state.activeHeight==667?'size active':'size'} onClick={()=>this.handleSize(375,667)}>主流机型<span>375x667</span></div><div className={this.state.activeHeight==750?'size active':'size'} onClick={()=>this.handleSize(375,750)}><span>375x750</span></div><div className={this.state.activeHeight==812?'size active':'size'} onClick={()=>this.handleSize(375,812)}><span>375x812</span></div><div className={this.state.activeHeight==500?'size active':'size'} onClick={()=>this.handleSize(375,500)}><span>375x500</span></div></section> <section class="screen-size-selector"><div className={this.state.activeHeight==667?'size active':'size'} onClick={()=>this.handleSize(375,667)}>主流机型<span>375x667</span></div><div className={this.state.activeHeight==750?'size active':'size'} onClick={()=>this.handleSize(375,750)}><span>375x750</span></div><div className={this.state.activeHeight==812?'size active':'size'} onClick={()=>this.handleSize(375,812)}><span>375x812</span></div><div className={this.state.activeHeight==500?'size active':'size'} onClick={()=>this.handleSize(375,500)}><span>375x500</span></div></section>
<p>落地页类型:</p> <p>落地页类型:</p>
<RadioGroup onChange={(e)=>{this.onTypeChange(e)} } value={this.state.showType} > <RadioGroup onChange={(e)=>{this.onTypeChange(e)} } value={this.state.showType} >
<RadioButton value={3} >兑换码</RadioButton> <RadioButton value={3} disabled={this.state.sourceIndex==1}>兑换码</RadioButton>
<RadioButton value={1} >白名单</RadioButton> <RadioButton value={1} disabled={this.state.sourceIndex==1}>白名单</RadioButton>
<RadioButton disabled={true} value={2}>立减金</RadioButton> <RadioButton disabled={true} value={2}>立减金</RadioButton>
</RadioGroup> </RadioGroup>

View File

@ -2672,6 +2672,6 @@ div.previewclose {
.left-choice .zent-radio-button--checked[data-zv="9.11.0"]{ .left-choice .zent-radio-button--checked[data-zv="9.11.0"]{
background: rgba(41, 107, 239, 0.08)!important; background: rgba(41, 107, 239, 0.08)!important;
border: 1px solid #2096f5; border: 1px solid #2096f5!important;
color: #296bef; color: #296bef!important;
} }