落地页编辑禁止修改类型

This commit is contained in:
red-deng-deng 2022-01-12 14:06:37 +08:00
parent f9b1560d26
commit 9211041140
1 changed files with 7 additions and 4 deletions

View File

@ -24,6 +24,7 @@ export default class edittemplate extends React.Component{
activeshow:true,//控制显示 activeshow:true,//控制显示
loading_visible:false, loading_visible:false,
detailactiveshow:true, detailactiveshow:true,
pagedisable:false,
showType:1,//兑换码/白名单/立减金 showType:1,//兑换码/白名单/立减金
//落地页 //落地页
model:{ model:{
@ -105,6 +106,9 @@ getLandingdata(val){
newObj.product_detail=product_detail; newObj.product_detail=product_detail;
this.setState({showType:myInfoData.page}); this.setState({showType:myInfoData.page});
sessionStorage.setItem('editorConfig',JSON.stringify(newObj)); sessionStorage.setItem('editorConfig',JSON.stringify(newObj));
if(sessionStorage.getItem('mouldType')==2){
this.setState({pagedisable:true});
}
} }
} }
async onSave(){ async onSave(){
@ -154,7 +158,6 @@ getLandingdata(val){
if(this.state.model.sort){ if(this.state.model.sort){
formdata.sort=this.state.model.sort; formdata.sort=this.state.model.sort;
} }
console.log(this.state.model);
if(this.state.model.type_id){ if(this.state.model.type_id){
formdata.type_id=this.state.model.type_id.key; formdata.type_id=this.state.model.type_id.key;
} }
@ -484,9 +487,9 @@ getLandingdata(val){
</div> </div>
<div id="leftComponent"> <div id="leftComponent">
<div className="showTypechice"> <div className="showTypechice">
<RadioGroup onChange={(e)=>{this.onmodelChange(e)} } value={this.state.showType}> <RadioGroup onChange={(e)=>{this.onmodelChange(e)} } value={this.state.showType} >
<RadioButton value={1}>兑换码</RadioButton> <RadioButton value={1} disabled={this.state.pagedisable}>兑换码</RadioButton>
<RadioButton value={2}>白名单</RadioButton> <RadioButton value={2} disabled={this.state.pagedisable}>白名单</RadioButton>
<RadioButton disabled={true} value={3}>立减金</RadioButton> <RadioButton disabled={true} value={3}>立减金</RadioButton>
</RadioGroup> </RadioGroup>
</div> </div>