fix: 增加过期时间

This commit is contained in:
zhangds 2024-03-25 19:46:30 +08:00
parent edc4e7f000
commit 4532b3b1d9
1 changed files with 13 additions and 0 deletions

View File

@ -296,6 +296,19 @@
window.location.replace("./homepage.html"); window.location.replace("./homepage.html");
}, 300) }, 300)
} else { } 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.goodsName = res.data[0].entity.product_name;
state.type = res.data[0].type; // 1商品 2立减金 3红包 4组合商品 -> 兑换码类型 state.type = res.data[0].type; // 1商品 2立减金 3红包 4组合商品 -> 兑换码类型