diff --git a/index.html b/index.html
index b106307..ad28674 100644
--- a/index.html
+++ b/index.html
@@ -122,8 +122,8 @@
});
let self = this;
//获取链接携带的参数
- // let linkId = getQueryString('id');
- let linkId = "2253"
+ let linkId = getQueryString('id');
+ // let linkId = "2253"
let keyCode = getQueryString('key');
if (!linkId) {//地址栏无携带id
diff --git a/packkey/combining.html b/packkey/combining.html
index ab79746..2b8b496 100644
--- a/packkey/combining.html
+++ b/packkey/combining.html
@@ -327,7 +327,9 @@
popMsg: false,
popboxshow: false,
maskshow: false,
- tiptext: ""
+ tiptext: "",
+ cont: 0,
+ timeGet: null
};
},
@@ -424,6 +426,28 @@
this.tiptext = tip;
this.popboxshow = true;
},
+ // 轮循
+ groupProductVoucherDetail() {
+ req.axiosGet('/key/group/groupProductVoucherDetail', {
+ token: this.token,
+ code_batch_id: this.code_batch_id
+ }).then(res => {
+ if (res.code === 200) {
+ // 状态不为 发放中 停止轮循
+ if (res.data.send_status !== 1) {
+ this.goods = {
+ ...this.goods,
+ ...res.data,
+ }
+ clearInterval(this.timeGet);
+ this.timeGet = null;
+ }
+ } else {
+ clearInterval(this.timeGet);
+ this.timeGet = null;
+ }
+ })
+ },
//获取商品详情
getProductDetail() {
req.axiosGet('/key/group/groupProductDetail', {
@@ -436,6 +460,20 @@
// send_status 1发放中,2全部成功 ,3全部失败,4部分失败 ,5未领取
this.popMsg = res.data.send_status === 2 || res.data.send_status === 3 || res.data.send_status === 4 ? true : false;
+ // 发放中 轮循
+ if (res.data.send_status === 1) {
+ this.timeGet = setInterval(() => {
+ // 安全值
+ if (this.cont > 10) {
+ clearInterval(this.timeGet);
+ this.timeGet = null;
+ }
+ this.groupProductVoucherDetail();
+ this.cont++;
+ }, 5000)
+ }
+
+
// 代码暂时这样
if (res.data.group_info.channel == 1 && res.data.group_info.receive_mode == 1) {