fix(系统模板):修复【系统营销模板】在白名单(优惠券、优惠券白名单)中保存时,前端传的标题有误

This commit is contained in:
Apple 2022-10-11 14:51:43 +08:00
parent 78553e8748
commit 2be0ae8b07
1 changed files with 5 additions and 5 deletions

View File

@ -236,7 +236,7 @@ export default class edittemplate extends React.Component {
let pageChange = sessionStorage.getItem('pageChange') let pageChange = sessionStorage.getItem('pageChange')
if (myInfoData) { if (myInfoData) {
let template = myInfoData.page let template = myInfoData.page
this.setState({ showType: Number(myInfoData.page) }) this.setState({ showType: Number(myInfoData.page),systemTitle: myInfoData.title})
let newEditor = _.clone(myInfoData) let newEditor = _.clone(myInfoData)
if (typePage) { if (typePage) {
this.setState({ showType: Number(typePage) }) this.setState({ showType: Number(typePage) })
@ -374,17 +374,17 @@ export default class edittemplate extends React.Component {
} }
if (mouldType == 0) { if (mouldType == 0) {
//系统模板新增 //系统模板新增
formdata.sort = exchangeStateData.model.sort formdata.title=exchangeStateData.systemTitle;
formdata.type_id = exchangeStateData.model.type_id.key formdata.sort = exchangeStateData.model.sort;
formdata.type_id = exchangeStateData.model.type_id.key;
let infoExchange = {} let infoExchange = {}
infoExchange.land = exchangeStateData.model infoExchange.land = exchangeStateData.model
infoExchange.product_list = exchangeStateData.product_list infoExchange.product_list = exchangeStateData.product_list
infoExchange.product_detail = exchangeStateData.product_detail infoExchange.product_detail = exchangeStateData.product_detail
_.omit(infoExchange.land, ['title', 'sort']);
_.omit(infoWhite.land, ['title', 'sort']);
formdata.exchange = infoExchange formdata.exchange = infoExchange
formdata.access_conf = infoWhite formdata.access_conf = infoWhite
formdata.coupon = infoCoupon formdata.coupon = infoCoupon
console.log(387,exchangeStateData);
if (myInfoData) { if (myInfoData) {
//编辑 //编辑
putSystemTemplate(myInfoData.id, formdata).then((res) => { putSystemTemplate(myInfoData.id, formdata).then((res) => {