This commit is contained in:
zhangds 2022-09-19 12:05:09 +08:00
commit 3a8fdd7f44
4 changed files with 39 additions and 44 deletions

View File

@ -123,11 +123,11 @@ export default class Searchbar extends React.Component {
</FormItem>
<FormItem required={false} labelname="背景颜色:" labelwidth="80px">
<div className="colorItemfont dfleac">
<span style={{ border: '1px solid #f1f2f3' }} className={borderColor == '#fff' ? "cicle activecicle" : "cicle"} onClick={() => { this.bgColorFn('#fff') }}></span>
<span className={borderColor == '#04C160' ? "activecicle cicle cicle6" : "cicle cicle6"} onClick={() => { this.bgColorFn('#04C160') }}></span>
<span className={borderColor == '#AE99D3' ? "activecicle cicle cicle3" : "cicle cicle3"} onClick={() => { this.bgColorFn('#AE99D3') }}></span>
<span className={borderColor == '#FACD6A' ? "activecicle cicle cicle4" : "cicle cicle4"} onClick={() => { this.bgColorFn('#FACD6A') }}></span>
<span className={borderColor == '#FE7962' ? "activecicle cicle cicle5" : "cicle cicle5"} onClick={() => { this.bgColorFn('#FE7962') }}></span>
<span style={{ border: '1px solid #f1f2f3' }} className={bgColor == '#fff' ? "cicle activecicle" : "cicle"} onClick={() => { this.bgColorFn('#fff') }}></span>
<span className={bgColor == '#04C160' ? "activecicle cicle cicle6" : "cicle cicle6"} onClick={() => { this.bgColorFn('#04C160') }}></span>
<span className={bgColor == '#AE99D3' ? "activecicle cicle cicle3" : "cicle cicle3"} onClick={() => { this.bgColorFn('#AE99D3') }}></span>
<span className={bgColor == '#FACD6A' ? "activecicle cicle cicle4" : "cicle cicle4"} onClick={() => { this.bgColorFn('#FACD6A') }}></span>
<span className={bgColor == '#FE7962' ? "activecicle cicle cicle5" : "cicle cicle5"} onClick={() => { this.bgColorFn('#FE7962') }}></span>
<div className="selfset">
<ColorPicker className="setbgColor" color={bgColor} onChange={this.changebgColor} />
</div>
@ -135,11 +135,11 @@ export default class Searchbar extends React.Component {
</FormItem>
<FormItem required={false} labelname="文字颜色:" labelwidth="80px">
<div className="colorItemfont dfleac">
<span style={{ border: '1px solid #f1f2f3' }} className={borderColor == '#fff' ? "cicle activecicle" : "cicle"} onClick={() => { this.fontColorFn('#fff') }}></span>
<span className={borderColor == '#04C160' ? "activecicle cicle cicle6" : "cicle cicle6"} onClick={() => { this.fontColorFn('#04C160') }}></span>
<span className={borderColor == '#AE99D3' ? "activecicle cicle cicle3" : "cicle cicle3"} onClick={() => { this.fontColorFn('#AE99D3') }}></span>
<span className={borderColor == '#FACD6A' ? "activecicle cicle cicle4" : "cicle cicle4"} onClick={() => { this.fontColorFn('#FACD6A') }}></span>
<span className={borderColor == '#FE7962' ? "activecicle cicle cicle5" : "cicle cicle5"} onClick={() => { this.fontColorFn('#FE7962') }}></span>
<span style={{ border: '1px solid #f1f2f3' }} className={fontColor == '#fff' ? "cicle activecicle" : "cicle"} onClick={() => { this.fontColorFn('#fff') }}></span>
<span className={fontColor == '#04C160' ? "activecicle cicle cicle6" : "cicle cicle6"} onClick={() => { this.fontColorFn('#04C160') }}></span>
<span className={fontColor == '#AE99D3' ? "activecicle cicle cicle3" : "cicle cicle3"} onClick={() => { this.fontColorFn('#AE99D3') }}></span>
<span className={fontColor == '#FACD6A' ? "activecicle cicle cicle4" : "cicle cicle4"} onClick={() => { this.fontColorFn('#FACD6A') }}></span>
<span className={fontColor == '#FE7962' ? "activecicle cicle cicle5" : "cicle cicle5"} onClick={() => { this.fontColorFn('#FE7962') }}></span>
<div className="selfset">
<ColorPicker className="setbgColor" color={fontColor} onChange={this.changefontColor} />
</div>

View File

@ -284,7 +284,7 @@ export default class edittemplate extends React.Component {
/>
</FormItem>
{
this.props.couponType==4&&this.state.model.middle_image? <FormItem labelname="输入框1:" labelwidth="100px">
this.props.couponType==4? <FormItem labelname="输入框1:" labelwidth="100px">
<ImageUpload
className="zent-image-upload-demo"
maxSize={5 * 1024 * 1024}

View File

@ -590,7 +590,6 @@ export default class edittemplate extends React.Component {
landConfig.bg_color = c
this.setState({ model: landConfig })
}
//
getlandftcolor(c) {
let landConfig = this.state.model
landConfig.font_color = c
@ -656,27 +655,26 @@ export default class edittemplate extends React.Component {
this.setState({ product_list: goodsConfig })
}
onmodelChange(e) {
this.setState({ showType: e.target.value, activeNavStatus: 1 })
let editorData = _.cloneDeep(JSON.parse(sessionStorage.getItem('editorConfig')))
if (e.target.value == 1) {
let whiteData = editorData.whiteList
let { land, product_list, product_detail } = whiteData;
this.setState({ model: land, product_list, product_detail })
if (this.state.mouldType == 0) {
let whiteLand = whiteData.land
whiteLand.title = this.state.model.title
this.setState({ model: whiteLand })
let holdData;
switch(e.target.value){
case 1:
holdData= editorData.whiteList;
break;
case 3:
holdData= editorData.exchangeList
break;
default:
let {activeNavStatus,showType,model}=this.state;
if(activeNavStatus==1&&[4,8].includes(showType)){//落地页
editorData.coupon.land=model;
}
} else if (e.target.value == 3) {
let exchangeData = editorData.exchangeList
let { land, product_list, product_detail } = exchangeData;
this.setState({ model: land, product_list, product_detail })
} else{//优惠券+优惠券白名单
let couponData = editorData.coupon
let { land, product_list, product_detail } = couponData;
console.log(222,this.state.model);
this.setState({ model: land, product_list, product_detail })
sessionStorage.setItem('editorConfig',JSON.stringify(editorData));
holdData= editorData.coupon
break;
}
let { land, product_list, product_detail } = holdData;
this.setState({ showType: e.target.value, activeNavStatus: 1,model: land, product_list, product_detail })
}
onPreview() {
this.setState({ previewData: this.state })

View File

@ -148,18 +148,18 @@ const Column = [
type: "slot"
},
{
title: "折扣",
name: "discount",
title: "减扣价(元)",
name: "discount_amount",
prop: "discount_amount",
type: "normal",
prop: "discount",
width: "80px"
},
{
title: "结算",
name: "total",
prop: "total",
width: "auto",
type: "80px"
title: "结算价(元)",
name: "pay_amount",
prop: "pay_amount",
type: "normal",
width: "80px"
},
{
title: "key",
@ -198,11 +198,7 @@ export default class orderlist extends React.Component {
{ id: 111, name: "立减金-待领取" },
{ id: 222, name: "立减金-已领取" },
{ id: 5, name: "立减金-已过期" },
{ id: 6, name: "优惠券-待支付" },
{ id: 7, name: "优惠券-已支付" },
{ id: 8, name: "优惠券-已完成" },
{ id: 9, name: "优惠券-已取消" },
{ id: 10, name: "优惠券-充值失败" }
{ id: 6, name: "优惠券-待支付" }
]
}
],
@ -583,6 +579,7 @@ export default class orderlist extends React.Component {
})
.catch((err) => {})
}
optiononChange(e) {
let placeholder
let searchOption = Number(e ? e.key : 0)