diff --git a/src/App.css b/src/App.css index 7a796c84..cfa2dd36 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: 66666; + z-index: 6; } \ No newline at end of file diff --git a/src/pages/exchangepage/edittemplate/goodsPage.js b/src/pages/exchangepage/edittemplate/goodsPage.js index 237e4eaa..3e208ba6 100644 --- a/src/pages/exchangepage/edittemplate/goodsPage.js +++ b/src/pages/exchangepage/edittemplate/goodsPage.js @@ -16,7 +16,7 @@ export default class edittemplate extends React.Component{ this.state={ model:{ top_image: "", - list: 1, + list: "2", font_color:"#ffffff", button_color: "#FACD6A", describe: {type : "", content : "",bg_image:''} @@ -215,14 +215,14 @@ export default class edittemplate extends React.Component{
{this.onListChange(e)} } value={this.state.model.list}> - 轮播 - 列表 + 轮播 + 列表 矩阵
{ - this.state.model.list==1? + this.state.model.list==2?
{this.bgcolor('#ffffff')}}> {this.bgcolor('#000000')}}> @@ -232,7 +232,7 @@ export default class edittemplate extends React.Component{ :null } { - this.state.model.list==1? + this.state.model.list==2?
{this.fontcolor('#ffffff')}}> {this.fontcolor('#04C160')}}> diff --git a/src/pages/exchangepage/edittemplate/goodstemplate.js b/src/pages/exchangepage/edittemplate/goodstemplate.js index 58b8bc76..538e3a63 100644 --- a/src/pages/exchangepage/edittemplate/goodstemplate.js +++ b/src/pages/exchangepage/edittemplate/goodstemplate.js @@ -18,10 +18,10 @@ export default class edittemplate extends React.Component{ !this.props.goodsdata.top_image?: } { - this.props.goodsdata.list==1?:this.props.goodsdata.list==3?: + this.props.goodsdata.list==2?:this.props.goodsdata.list==3?: } { - this.props.goodsdata.list==1? :null + this.props.goodsdata.list==2? :null } { this.props.goodsdata.describe.type==1? :this.props.goodsdata.describe.type==3?
:null diff --git a/src/pages/exchangepage/edittemplate/goodstemplate.less b/src/pages/exchangepage/edittemplate/goodstemplate.less index a8edee31..85f84ffd 100644 --- a/src/pages/exchangepage/edittemplate/goodstemplate.less +++ b/src/pages/exchangepage/edittemplate/goodstemplate.less @@ -42,10 +42,10 @@ } .susactive_tip{ position: absolute; - top: 10px; - right: 10px; - width: 50px; - height: 50px; + top: 40px; + right: 0; + width: 30px; + // height: 70px;s cursor: pointer; } .bottomactiveTip{ diff --git a/src/pages/exchangepage/edittemplate/landingPage.js b/src/pages/exchangepage/edittemplate/landingPage.js index b2f0068c..47381d61 100644 --- a/src/pages/exchangepage/edittemplate/landingPage.js +++ b/src/pages/exchangepage/edittemplate/landingPage.js @@ -142,7 +142,12 @@ export default class edittemplate extends React.Component{ model.describe.bg_image= files[0].src; this.setState({model:model}) this.props.setbanner(model); - } + }else{ + let model = this.state.model; + model.describe.bg_image= ""; + this.setState({model:model}) + this.props.setbanner(model); + } }; onUploadError = (type, data) => { diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js index e0955099..9438e705 100644 --- a/src/pages/exchangepage/edittemplate/main.js +++ b/src/pages/exchangepage/edittemplate/main.js @@ -41,7 +41,7 @@ export default class edittemplate extends React.Component{ //商品列表 product_list:{ top_image: "", - list: 1, + list:"2", font_color:"#ffffff", button_color: "#FACD6A", describe: {type : "", content : "",bg_image:''}, @@ -165,7 +165,6 @@ getLandingdata(val){ putSystemTemplate(myInfoData.id,formdata).then((res)=>{ handelResponse(res,(req,msg)=>{ Notify.success("保存成功") - this.props.history.push('/home/system/my-mould'); },(err)=>{ Notify.error(err) @@ -195,6 +194,7 @@ getLandingdata(val){ self.props.history.push('/home/myexchangetemplate'); }, 2000); },(err)=>{ + self.setState({loading_visible:false}); Notify.error(err) }) }); @@ -207,6 +207,7 @@ getLandingdata(val){ self.props.history.push('/home/myexchangetemplate'); }, 2000); },(err)=>{ + self.setState({loading_visible:false}); Notify.error(err) }) }); @@ -214,10 +215,12 @@ getLandingdata(val){ }else if(mouldType==2){//落地页编辑 putTheme(myInfoData.id,formdata).then((res)=>{ handelResponse(res,(req,msg)=>{ + self.setState({loading_visible:false}); Notify.success(msg) self.props.history.push('/home/exchangepage'); },(err)=>{ + self.setState({loading_visible:false}); Notify.error(err) }) }); @@ -525,10 +528,10 @@ getLandingdata(val){ } { - this.state.product_list.list==1?:this.state.product_list.list==3?: + this.state.product_list.list==2?:this.state.product_list.list==3?: } { - this.state.product_list.list==1? :null + this.state.product_list.list==2? :null } { this.state.product_list.describe.type==1? :this.state.product_list.describe.type==3?
:null @@ -649,7 +652,7 @@ getLandingdata(val){ { this.state.preview_visible ? (
-
+
@@ -663,7 +666,7 @@ getLandingdata(val){ { this.state.loading_visible?(
-
+
):null diff --git a/src/pages/exchangepage/edittemplate/main.less b/src/pages/exchangepage/edittemplate/main.less index e232b37a..ebb5d414 100644 --- a/src/pages/exchangepage/edittemplate/main.less +++ b/src/pages/exchangepage/edittemplate/main.less @@ -1194,13 +1194,13 @@ content: ''; position: absolute; z-index: 0; - top:-4px; - left: -4px; - width: 28px; - height: 28px; - border-radius: 28px; + top:-3px; + left: -3px; + width: 22px; + height: 22px; + border-radius: 22px; background: transparent; - border:1px solid #fff; + // border:1px solid #fff; } .cicle{ @@ -1213,6 +1213,10 @@ margin-left: 8px; cursor: pointer; z-index: 55; + &.activecicle{ + width:18px; + height: 18px; + } &.activecicle::before{ border:1px solid #cbe1fd; } @@ -1497,7 +1501,7 @@ } .editbg{ width: 100%; - min-height: 300px; + min-height: 30px; position: relative; .bgimg{ position: absolute; @@ -1507,8 +1511,8 @@ } div{ width: 100%; - padding:0 24px; - line-height: 1.35rem; + padding:0 25px; + line-height: 1.5rem; font-size: 13px; box-sizing: border-box; top: 70px; @@ -1625,10 +1629,10 @@ div{ height: 100%; .susactive_Tip{ position: absolute; - top: 0.3vw; - right: 0.3vw; - width: 24px; - height: 24px; + top: 14px; + right: 0; + width: 14px; + // height: 24px; } .topBanner{ width: 100%; @@ -1700,10 +1704,10 @@ div{ } .susactive_Tip{ position: absolute; - top: 0.2vw; - right: 0.2vw; - width: 24px; - height: 24px; + top:14px; + right: 0; + width: 14px; + // height: 24px; } .preBtn{ position: absolute; @@ -1763,4 +1767,7 @@ div{ top: 30%; left: 50%; z-index: 99999; +} +.model44{ + z-index: 88888; } \ No newline at end of file diff --git a/src/pages/exchangepage/edittemplate/wangeditorCom.js b/src/pages/exchangepage/edittemplate/wangeditorCom.js index 81617fbd..c5586151 100644 --- a/src/pages/exchangepage/edittemplate/wangeditorCom.js +++ b/src/pages/exchangepage/edittemplate/wangeditorCom.js @@ -12,9 +12,13 @@ export default class wangeditor extends React.Component{ let config=JSON.parse(sessionStorage.getItem('editorConfig')); let self=this; const editor = new Editor('#wangeditorDom') - this.setState({editor}); - let editDom=editor.$textElem.elems[0]; - + this.setState({editor}); + editor.config.colors = [ + '#880000', + '#800080', + '#ff0000' + ]; + editor.config.pasteText = true; // 设置编辑区域高度为 500px editor.config.height =200 editor.config.menus = [ @@ -25,13 +29,22 @@ export default class wangeditor extends React.Component{ 'link', 'justify', ] + // 注意,先配置 height ,再执行 create() editor.config.onchange = function (newHtml) { - console.log(30,newHtml); + console.log(35,newHtml); + + var text = editor.txt.text(); + console.log(38,text); + // if(text.length>10){ + // console.log('结束',text.length); + // return; + // } self.setState({editorHtml:newHtml}); self.props.setEdittext(newHtml); - + }; + editor.create() //列表悬浮富文本 let editext=""; diff --git a/src/pages/exchangepage/template/preview.less b/src/pages/exchangepage/template/preview.less index 8061b100..c68c772d 100644 --- a/src/pages/exchangepage/template/preview.less +++ b/src/pages/exchangepage/template/preview.less @@ -82,8 +82,8 @@ .textTip_land{ position: absolute; top: 0; - padding:60px 24px 24px; - line-height: 1.4rem; + padding:70px 25px 0; + line-height: 1.5rem; font-size: 13px; box-sizing: border-box; }