From 6b6b5b098f2e4baaefd66f95fa3a2e6a2cf7f7e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E7=BA=A2=E6=A2=85?= <1924913374@qq.com> Date: Thu, 15 Sep 2022 16:36:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=90=BD=E5=9C=B0=E9=A1=B5=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E7=99=BD=E5=90=8D=E5=8D=95/?= =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E6=96=B0=E5=A2=9E=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangepage/edittemplate/main.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) 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) { //编辑