我的模板列表,落地页类型渲染处理,兑换码 3

白名单   1
优惠券   4
优惠券白名单  8
This commit is contained in:
许红梅 2022-09-16 09:39:40 +08:00
parent 6b6b5b098f
commit 17f38c3491
2 changed files with 16 additions and 6 deletions

View File

@ -100,6 +100,8 @@ const menu={
case 3:return '兑换码';break; case 3:return '兑换码';break;
case 1:return '白名单';break; case 1:return '白名单';break;
case 2:return '立减金';break; case 2:return '立减金';break;
case 4:return '优惠券';break;
case 8:return '优惠券白名单';break;
} }
}, },
pageTypeStatusBg(params) { pageTypeStatusBg(params) {
@ -107,6 +109,8 @@ const menu={
case 1:return '#ffaa00';break; case 1:return '#ffaa00';break;
case 2:return '#e64c00';break; case 2:return '#e64c00';break;
case 3:return '#55aaff';break; case 3:return '#55aaff';break;
case 4:return '#79AF83';break;
case 8:return '#F2A505';break;
} }
}, },
keysStatus(params) { keysStatus(params) {

View File

@ -347,18 +347,24 @@ export default class edittemplate extends React.Component {
newEditor.exchangeList = exchangeList newEditor.exchangeList = exchangeList
newEditor.whiteList = whiteList newEditor.whiteList = whiteList
newEditor.couponList = couponList; newEditor.couponList = couponList;
if (template == 1) { //1-白名单 2-兑换码 if (template == 1) { //1-白名单 3-兑换码
this.setState({ this.setState({
model: newEditor.whiteList.land, model: newEditor.whiteList.land,
product_list: newEditor.whiteList.product_list, product_list: newEditor.whiteList.product_list,
product_detail: newEditor.whiteList.product_detail product_detail: newEditor.whiteList.product_detail
}) })
} else { } else if (template ==3){
this.setState({ this.setState({
model: newEditor.exchangeList.land, model: newEditor.exchangeList.land,
product_list: newEditor.exchangeList.product_list, product_list: newEditor.exchangeList.product_list,
product_detail: newEditor.exchangeList.product_detail product_detail: newEditor.exchangeList.product_detail
}) })
}else{
this.setState({
model: newEditor.couponList.land,
product_list: newEditor.couponList.product_list,
product_detail: newEditor.couponList.product_detail
})
} }
sessionStorage.setItem('editorConfig', JSON.stringify(newEditor)) sessionStorage.setItem('editorConfig', JSON.stringify(newEditor))
if (mouldType != 0 && pageChange == 1) { if (mouldType != 0 && pageChange == 1) {
@ -499,10 +505,10 @@ export default class edittemplate extends React.Component {
case 1://白名单 case 1://白名单
formdata.access_conf = infoExchange formdata.access_conf = infoExchange
break; break;
case 2://优惠券 case 4://优惠券
formdata.couponList = infoExchange; formdata.couponList = infoExchange;
break; break;
case 4://优惠券白名单 case 8://优惠券白名单
formdata.couponList = infoExchange; formdata.couponList = infoExchange;
break; break;
default: default:
@ -854,10 +860,10 @@ export default class edittemplate extends React.Component {
<RadioButton value={1} disabled={this.state.pagedisable}> <RadioButton value={1} disabled={this.state.pagedisable}>
白名单 白名单
</RadioButton> </RadioButton>
<RadioButton value={2} disabled={this.state.pagedisable}> <RadioButton value={4} disabled={this.state.pagedisable}>
优惠券 优惠券
</RadioButton> </RadioButton>
<RadioButton value={4} disabled={this.state.pagedisable}> <RadioButton value={8} disabled={this.state.pagedisable}>
优惠券白名单 优惠券白名单
</RadioButton> </RadioButton>
</RadioGroup> </RadioGroup>