落地页模板优惠券白名单/优惠券新增数据处理

This commit is contained in:
许红梅 2022-09-15 16:36:23 +08:00
parent d2b65933fd
commit 6b6b5b098f
1 changed files with 15 additions and 6 deletions

View File

@ -334,7 +334,6 @@ export default class edittemplate extends React.Component {
whiteList['land'].title = newEditor.title
whiteList['land'].sort = newEditor.sort
//优惠券
console.log(337,newEditor);
let couponList = newEditor.couponList
if (!couponList) {
couponList = {}
@ -493,11 +492,21 @@ export default class edittemplate extends React.Component {
infoExchange.product_detail = exchangeState.product_detail
delete infoExchange.land.sort
delete infoExchange.land.title
if (this.state.showType == 3) {
//兑换码
formdata.exchange = infoExchange
} else if (this.state.showType == 1) {
switch(this.state.showType){
case 3://兑换码
formdata.exchange = infoExchange;
break;
case 1://白名单
formdata.access_conf = infoExchange
break;
case 2://优惠券
formdata.couponList = infoExchange;
break;
case 4://优惠券白名单
formdata.couponList = infoExchange;
break;
default:
break;
}
if (myInfoData) {
//编辑