fix:增加跳转逻辑

This commit is contained in:
zhangds 2024-02-25 17:19:14 +08:00
parent f9cb6607c5
commit e53243b8c1
1 changed files with 5 additions and 28 deletions

View File

@ -152,34 +152,11 @@
if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 4) {
settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type);
}
let type = state.type;
let entity = state.entity;
/*
* type: 1商品 2立减金 3红包 -> 兑换码类型
* channel: 1支付宝 2微信 3云闪付 -> 渠道平台
* receive_mode: 1官方领取 2账号领取 -> 领取方式
*/
if (type == 1) {
window.location.replace("./exchange.html");
}
if (type == 2) {
if (entity.channel === 3) {
window.location.replace("./ysf-reduce.html");
} else if (entity.channel === 1 && entity.receive_mode === 2) {
window.location.replace("./zfb-reduce.html");
} else {
window.location.replace("./reduce.html");
}
}
if (type == 3) {
if (entity.channel === 3) {
window.location.replace("./ysf.html");
} else if (entity.channel === 1 && entity.receive_mode === 2) {
window.location.replace("./zfb-redPackets.html");
} else {
window.location.replace("./redPackets.html");
}
}
setTimeout(() => {
window.location.href = './homepage.html';
}, 300)
}