diff --git a/src/pages/exchangecode/edit/edit.js b/src/pages/exchangecode/edit/edit.js index bf7256ae..1e72d880 100644 --- a/src/pages/exchangecode/edit/edit.js +++ b/src/pages/exchangecode/edit/edit.js @@ -537,13 +537,6 @@ export default class exchangedit extends React.Component { addProduct.map((item) => { if (item.type === 2) { if (item.origin) { - const is = this.compareDate( - this.state.codeInfo.date_time[1], - item.origin.time_limit.effect_time.end_time - ) - if (!is) - item.origin.time_limit.effect_time.end_time = - this.state.codeInfo.date_time[1] addProductCopy.reduce.push(item.origin) } } else { @@ -555,13 +548,6 @@ export default class exchangedit extends React.Component { const updateProductCopy = { legal: [], reduce: [] } updateProduct.map((item) => { if (item.type === 2) { - const is = this.compareDate( - this.state.codeInfo.date_time[1], - item.time_limit.effect_time.end_time - ) - if (!is) - item.time_limit.effect_time.end_time = - this.state.codeInfo.date_time[1] updateProductCopy.reduce.push(item) } else { updateProductCopy.legal.push(item) @@ -588,11 +574,6 @@ export default class exchangedit extends React.Component { return { data, addProduct, updateProduct } } - //比较时间 - compareDate(d1, d2) { - return new Date(d1.replace(/-/g, '/')) > new Date(d2.replace(/-/g, '/')) - } - submitCodeData() { if (!this.state.reseller) { Notify.error('该兑换码对应分销商不存在')