From 44a240172adfd1951b6965925aa49781ba8e03c4 Mon Sep 17 00:00:00 2001 From: Apple <> Date: Wed, 12 Oct 2022 11:40:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E6=A8=A1=E6=9D=BF):?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BC=98=E6=83=A0=E5=88=B8=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=9B=BE=EF=BC=8C=E5=88=87=E6=8D=A2=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E8=83=8C=E6=99=AF=E4=B8=8D=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../couponCard/goodsPage/config/backPicture.js | 11 +++++------ .../couponCard/goodsPage/config/picture.js | 2 +- src/pages/exchangepage/edittemplate/main.less | 3 --- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/pages/exchangepage/edittemplate/couponCard/goodsPage/config/backPicture.js b/src/pages/exchangepage/edittemplate/couponCard/goodsPage/config/backPicture.js index 24b7059b..5e248755 100644 --- a/src/pages/exchangepage/edittemplate/couponCard/goodsPage/config/backPicture.js +++ b/src/pages/exchangepage/edittemplate/couponCard/goodsPage/config/backPicture.js @@ -10,7 +10,7 @@ export default class backPicture extends React.Component { constructor(props) { super(props) this.state = { - bgimg: '', + bgImg: '', bgColor: '#f2f3f4' } } @@ -18,9 +18,8 @@ export default class backPicture extends React.Component { componentWillMount(e) { let config = JSON.parse(sessionStorage.getItem('editorConfig')); if (config && config.coupon && config.coupon.product_list) { - let bgimg = config.coupon.product_list.backgroundImg.bgImg; - let {bgColor} = config.coupon.product_list.backgroundImg; - this.setState({ bgimg,bgColor }); + let {bgColor,bgImg} = config.coupon.product_list.backgroundImg; + this.setState({ bgImg,bgColor }); } } bgColorFn(color){ @@ -36,7 +35,7 @@ export default class backPicture extends React.Component { if (files.length > 0 && files[0].status == "success") { bgImage=files[0].src; } - this.setState({ bgimg: bgImage }) + this.setState({ bgImg: bgImage }) Bus.emit('bgImgConfig',{attr:'bgImg',value:bgImage}) }; @@ -119,7 +118,7 @@ export default class backPicture extends React.Component { tips="单张图片不超过 5M" onChange={(e) => { this.onUploadChange(e) }} onUpload={this.onUpload} - defaultFileList={this.state.bgimg ? [{ 'src': this.state.bgimg }] : null} + defaultFileList={this.state.bgImg ? [{ 'src': this.state.bgImg }] : null} onError={this.onUploadError} /> diff --git a/src/pages/exchangepage/edittemplate/couponCard/goodsPage/config/picture.js b/src/pages/exchangepage/edittemplate/couponCard/goodsPage/config/picture.js index 215dddf8..b01dad97 100644 --- a/src/pages/exchangepage/edittemplate/couponCard/goodsPage/config/picture.js +++ b/src/pages/exchangepage/edittemplate/couponCard/goodsPage/config/picture.js @@ -11,7 +11,7 @@ export default class edittemplate extends React.Component { constructor(props) { super(props) this.state = { - iswitch:true, + iswitch:1, img:'', jumpType:'0',//0不跳转 1跳转 jumpUrl:'' diff --git a/src/pages/exchangepage/edittemplate/main.less b/src/pages/exchangepage/edittemplate/main.less index 99ec7b39..01e1da0f 100644 --- a/src/pages/exchangepage/edittemplate/main.less +++ b/src/pages/exchangepage/edittemplate/main.less @@ -555,9 +555,6 @@ .detailstemplate{ transform: scale(0.387); transform-origin: 0 0; - img{ - width: auto!important; - } .iptbg{ width: 100%!important; }