diff --git a/src/App.css b/src/App.css index cfa2dd36..7a796c84 100644 --- a/src/App.css +++ b/src/App.css @@ -188,6 +188,6 @@ resize: none; left: 0; top: 0; background-color: rgba(0,0,0,0.5); - z-index: 6; + z-index: 66666; } \ No newline at end of file diff --git a/src/pages/exchangepage/edittemplate/goodsPage.js b/src/pages/exchangepage/edittemplate/goodsPage.js index be0f5a03..1b0d1b15 100644 --- a/src/pages/exchangepage/edittemplate/goodsPage.js +++ b/src/pages/exchangepage/edittemplate/goodsPage.js @@ -69,7 +69,14 @@ export default class edittemplate extends React.Component{ this.setState({model:model1}) this.props.setactiveType(e.target.value); } - + hasItemFn(c){ + let model1=this.state.model; + if(c==model1.activityType){ + model1.activityType=''; + this.setState({model:model1}); + this.props.setactiveType(''); + } + } //顶部banner onUploadChange(files){ if(files.length > 0 && files[0].status == "success") @@ -104,13 +111,13 @@ export default class edittemplate extends React.Component{ onUploadChange2(files){ if(files.length > 0 && files[0].status == "success") { - let model = this.state.model; - model.images[2] = files[0].src; - this.setState({model:model}) + let model1 = this.state.model; + model1.images[1] = files[0].src; + this.setState({model:model1}) this.props.setbottomImg(files[0].src); }else{ let model = this.state.model; - model.images[2] =''; + model.images[1] =''; this.setState({model:model}) this.props.setbottomImg(""); } @@ -282,9 +289,9 @@ export default class edittemplate extends React.Component{
{this.onactivityChange(e)} } value={this.state.model.activityType}> - 图片 - 悬浮 - 富文本 + this.hasItemFn(1)} value={1}>图片 + this.hasItemFn(2)} value={2}>悬浮 + this.hasItemFn(3)} value={3}>富文本 @@ -304,9 +311,9 @@ export default class edittemplate extends React.Component{ onChange={(e)=>{this.onUploadChange2(e)} } onUpload={this.onUpload} onError={this.onUploadError} - defaultFileList={this.state.model.images[2] ? [{'src':this.state.model.images[2]}] : null} + defaultFileList={this.state.model.images[1] ? [{'src':this.state.model.images[1]}] : null} /> - :this.state.model.activityType==2?this.getsusEditext(c)} />:this.getEditext(c)}/> + :this.state.model.activityType==2?this.getsusEditext(c)} />:this.state.model.activityType==3?this.getEditext(c)}/>:null } diff --git a/src/pages/exchangepage/edittemplate/goodstemplate.js b/src/pages/exchangepage/edittemplate/goodstemplate.js index 81ae6c62..3be4f72a 100644 --- a/src/pages/exchangepage/edittemplate/goodstemplate.js +++ b/src/pages/exchangepage/edittemplate/goodstemplate.js @@ -11,6 +11,7 @@ export default class edittemplate extends React.Component{ this.props.opendesc(true) } render(){ + console.log(14,this.props); return(
diff --git a/src/pages/exchangepage/edittemplate/landingPage.js b/src/pages/exchangepage/edittemplate/landingPage.js index ae84d8b9..688a70e5 100644 --- a/src/pages/exchangepage/edittemplate/landingPage.js +++ b/src/pages/exchangepage/edittemplate/landingPage.js @@ -53,9 +53,22 @@ export default class edittemplate extends React.Component{ let active=this.state.model; active.activityType=e.target.value; active.editorHtml=''; + if(active.images&&active.images.length==3){ + active.images[2]=""; + } this.setState({model:active}) + this.props.setbanner(this.state.model); - } + } + hasItemFn(c){ + let model1=this.state.model; + if(c==model1.activityType){ + model1.activityType=''; + model1.activityType=0; + this.setState({model:model1}); + this.props.setbanner(this.state.model); + } + } //上传顶部banner onUploadChange(files){ if(files.length > 0 && files[0].status == "success") @@ -200,23 +213,11 @@ export default class edittemplate extends React.Component{ render(){ - - const rules = { - title: [ - { type: "required", message: "请输入营销计划名称"}, - ], - level:[ - { type: "required", message: "请输入权重"}, - { type: "regExp", message: "请输入正整数",reg:"^([1-9][0-9]*){1,3}$"}, - ] - } - - return(
基础设置
-
+ { let model2 = this.state.model; @@ -294,8 +295,8 @@ export default class edittemplate extends React.Component{ {this.onactivityChange(e)} } value={this.state.model.activityType}> - 图片 - 富文本 + this.hasItemFn(1)}>图片 + this.hasItemFn(2)}>富文本 { diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js index 888fcf99..8f9297ea 100644 --- a/src/pages/exchangepage/edittemplate/main.js +++ b/src/pages/exchangepage/edittemplate/main.js @@ -278,7 +278,7 @@ getLandingdata(val){ //获取落地页数据 getlandbgcolor(c){ let landConfig=this.state.model; - landConfig.bgcolor=c; + landConfig.bg_color=c; this.setState({model:landConfig}); } // @@ -499,11 +499,14 @@ getLandingdata(val){ } // 背景颜色 bgcolor(cor){ - this.setState({bg_color:cor}); + this.setState({bgcolor:cor}); } showactiveIcon(c){ this.setState({activeshow:false}); } + showactivedetail(c){ + this.setState({detailactiveshow:false}); + } onUpload = (file, report) => { let self=this; console.log('上传头像',file); @@ -558,18 +561,7 @@ getLandingdata(val){ render(){ - - const rules = { - title: [ - { type: "required", message: "请输入营销计划名称"}, - ], - level:[ - { type: "required", message: "请输入权重"}, - { type: "regExp", message: "请输入正整数",reg:"^([1-9][0-9]*){1,3}$"}, - ] - } - - + console.log(564,this.state); return(
@@ -682,7 +674,7 @@ getLandingdata(val){
-
+
{ !this.state.model.images[0]? : @@ -716,7 +708,7 @@ getLandingdata(val){ this.state.activeNavStatus!=2?null:this.state.activeshow&&this.state.goodsConfigure.activeType==2&&this.state.goodsConfigure.editorHtml?this.showactiveIcon(c)} goodsdata={this.state.goodsConfigure}/>:this.setState({activeshow:true})} goodsdata={this.state.goodsConfigure}/> } { - this.state.activeNavStatus!=3?null:this.state.detailactiveshow&&this.state.detailConfigure.activeType==2&&this.state.detailConfigure.editorHtml?this.showactiveIcon(c)} goodsdata={this.state.goodsConfigure}/>:this.setState({detailactiveshow:true})} detaildata={this.state.detailConfigure}/> + this.state.activeNavStatus!=3?null:this.state.detailactiveshow&&this.state.detailConfigure.activeType==2&&this.state.detailConfigure.editorHtml?this.showactivedetail(c)} goodsdata={this.state.detailConfigure}/>:this.setState({detailactiveshow:true})} detaildata={this.state.detailConfigure}/> }