From 9de02b0688a57ca0eabcab9ba956bbd665df0381 Mon Sep 17 00:00:00 2001 From: zhangds Date: Sat, 6 Apr 2024 17:55:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E8=BD=AE=E8=AE=AD?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- combining.html | 54 ++++++++--------------------------------- favicon.ico | Bin 586 -> 0 bytes index.html | 6 ++--- packkey/combining.html | 51 +++++++------------------------------- 4 files changed, 21 insertions(+), 90 deletions(-) delete mode 100644 favicon.ico diff --git a/combining.html b/combining.html index 245ca81..6a2b15b 100644 --- a/combining.html +++ b/combining.html @@ -394,11 +394,10 @@ // 轮循 groupProductVoucherDetail() { let self = this; - req.axiosGet('/key/group/groupProductVoucherDetail', { + req.axiosPost('/key/group/groupProductVoucherDetail', { token: this.token, code_batch_id: this.code_batch_id }).then(res => { - if (res.code === 200) { // send_status 1发放中,2全部成功 ,3全部失败,4部分失败 ,5未领取 @@ -432,33 +431,6 @@ } }) - // res.data.product.forEach(item => { - // let el = self.goods.product.find(items => items.id === item.id); - // if (el) { - // item.order_voucher.forEach(row => { - - // // 存储错误 - // if (row.receive_error !== "") { - // all_err.push(row.receive_error); - // } - - // let obj = { - // id: item.id, - // type: item.type, - // voucher: { - // denomination: el.voucher.denomination, - // reduce_amount: el.voucher.reduce_amount, - // status: self.formatStatus(row.status), - // num: self.formatStatus(row.status) === 3 ? 0 : 1, - // send_num: 1 - // } - // } - // product_all.push(obj) - // debugger; - // }) - // } - // }) - // 第二步:更新商品数据 self.goods.product = product_all; @@ -471,6 +443,14 @@ let ffLength = product_all.filter(item => item.voucher.status === 2); if (ffLength.length > 0) { self.goods.send_status = 1; + setTimeout(() => { + if (self.cont > 10) { + // 放弃 + return; + } + self.groupProductVoucherDetail(); + self.cont++; + }, 5000); return; } @@ -484,8 +464,6 @@ self.goods.err_msg = [...new Set(all_err)]; self.popMsg = true; - clearInterval(self.timeGet); - self.timeGet = null; return } else if (errLength.length > 0 && product_all.length > errLength.length) { // 领取失败数,小于全部数量 -> send_status 4 部分失败 @@ -496,8 +474,6 @@ self.goods.send_status = 4; self.popMsg = true; - clearInterval(self.timeGet); - self.timeGet = null; return } @@ -507,13 +483,8 @@ self.goods.send_status = 2; self.popMsg = true; - clearInterval(self.timeGet); - self.timeGet = null; return } - } else { - clearInterval(self.timeGet); - self.timeGet = null; } }) }, @@ -542,12 +513,7 @@ // 发放中 轮循 if (res.data.send_status === 1) { - self.timeGet = setInterval(() => { - // 安全值 - if (self.cont > 10) { - clearInterval(self.timeGet); - self.timeGet = null; - } + setTimeout(() => { self.groupProductVoucherDetail(); self.cont++; }, 5000) diff --git a/favicon.ico b/favicon.ico deleted file mode 100644 index 5ff82f8b0bc4a8bf27c9c09bb875c0115f3707d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 586 zcmeAS@N?(olHy`uVBq!ia0vp^l0YoM!2~25t{FgZf>Flf!P?VpRnUl)E zpfNEyAwkGPN8?0dVnV`+v)Y0eI&kd3X@#Q-(`LlPJdhB0z#MXj zVR7KW?b$p%3coh#ozRiIm;AoZBxbGlhV1tNy$=EohV(P-2ny<+-1tRa!OureLknoC z55uOZr@grx-iRqgFX4Ehp-|1%F_$lKJ>$m73U8PbOcfo^IeZgUh*q#vHe@|f$CUC~ zMX__a^2UYVnizIZ+_|)IwczU95MT%*?Xv|Z1rSlE6bW0nKI;GaJiKOB;` ad$Eb(j4H#apyB`nkR6_`elF{r5}E*W6TGef diff --git a/index.html b/index.html index 4506ab9..b106307 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,6 @@ charset="utf-8"> - @@ -71,7 +70,6 @@