From 4532b3b1d97ca5a3924cdf6576e6e91ae9141781 Mon Sep 17 00:00:00 2001 From: zhangds Date: Mon, 25 Mar 2024 19:46:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packkey/bm-index.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packkey/bm-index.html b/packkey/bm-index.html index 76dc3d7..1aab8e7 100644 --- a/packkey/bm-index.html +++ b/packkey/bm-index.html @@ -296,6 +296,19 @@ window.location.replace("./homepage.html"); }, 300) } else { + // 倒计时 + let out_time = sessionStorage.getItem("key_expiration_time"); + if (out_time && Number(out_time) !== 0) { + const cls = setInterval(() => { + const new_out_time = pageOutTime(out_time); + if (new_out_time) { + state.outTime = new_out_time; + } else { + state.outTime = ['00', '00', '00']; + clearInterval(cls); + } + }, 1000); + } state.goodsName = res.data[0].entity.product_name; state.type = res.data[0].type; // 1商品 2立减金 3红包 4组合商品 -> 兑换码类型