From 52a1450b350136da720c8fbd49376de281b6f4f0 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Tue, 16 Aug 2022 15:44:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E7=AB=8B=E5=87=8F?= =?UTF-8?q?=E9=87=91=E7=94=9F=E6=95=88=E6=97=B6=E9=97=B4=E9=99=90=E5=88=B6?= =?UTF-8?q?=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangecode/edit/edit.js | 19 ------------------- 1 file changed, 19 deletions(-) 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('该兑换码对应分销商不存在')