diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js index 41f70b29..bc371628 100644 --- a/src/pages/exchangepage/edittemplate/main.js +++ b/src/pages/exchangepage/edittemplate/main.js @@ -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) { - formdata.access_conf = infoExchange + 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) { //编辑