diff --git a/index.html b/index.html index c606d3a..841187b 100644 --- a/index.html +++ b/index.html @@ -224,12 +224,13 @@ methods: { // 判断是否是包码 跳转对应的包码页面 **** goToPackKey(data, type) { + // 存储数据 + sessionStorage.setItem("bm_auth", JSON.stringify(data)); + // 包码打开结算 if (!data.settlement_data.is_settlement && data.settlement_data.settlement_type === 2) { settlementFun(data.token, data.settlement_data.settlement_type); } - // 存储数据 - sessionStorage.setItem("bm_auth", JSON.stringify(data)); setTimeout(() => { if (type) { diff --git a/packkey/libs.js b/packkey/libs.js index aa628a7..70de0c4 100644 --- a/packkey/libs.js +++ b/packkey/libs.js @@ -5,7 +5,7 @@ */ const settlementFun = (token, settlementType) => { let obj_yz_data = JSON.parse(sessionStorage.getItem("bm_auth")); - if (obj_yz_data.settlement_data.is_settlement) { + if (obj_yz_data && obj_yz_data.settlement_data.is_settlement) { return; } let params = { diff --git a/packkey/ysf-reduce.html b/packkey/ysf-reduce.html index 7525624..1b5dfcd 100644 --- a/packkey/ysf-reduce.html +++ b/packkey/ysf-reduce.html @@ -187,7 +187,7 @@ .then(({ code, data, message }) => { // 使用结算 6 // 卡密做特殊处理,复制才会触发 - if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 6 && self.ysf.product_type !== 2) { + if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 6) { settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type); } @@ -196,7 +196,7 @@ if (code == 200) { // 使用成功结算 7 // 直充类 上游充值返回成功 - if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 7 && self.ysf.product_type !== 2) { + if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 7) { settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type); } this.verificationYsf(data); diff --git a/packkey/ysf.html b/packkey/ysf.html index 58e2bcc..b9b5dfa 100644 --- a/packkey/ysf.html +++ b/packkey/ysf.html @@ -170,7 +170,7 @@ .then(({ code, data, message }) => { // 使用结算 6 // 卡密做特殊处理,复制才会触发 - if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 6 && self.ysf.product_type !== 2) { + if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 6) { settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type); } @@ -178,7 +178,7 @@ if (code == 200) { // 使用成功结算 7 // 直充类 上游充值返回成功 - if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 7 && self.ysf.product_type !== 2) { + if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 7) { settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type); } diff --git a/packkey/zfb-redPackets.html b/packkey/zfb-redPackets.html index f8aaeb2..8a1c6d8 100644 --- a/packkey/zfb-redPackets.html +++ b/packkey/zfb-redPackets.html @@ -180,7 +180,7 @@ .then(({ code, data, message }) => { // 使用结算 6 // 卡密做特殊处理,复制才会触发 - if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 6 && self.goodInfo.product_type !== 2) { + if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 6) { settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type); } @@ -188,7 +188,7 @@ if (code == 200) { // 使用成功结算 7 // 直充类 上游充值返回成功 - if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 7 && self.goodInfo.product_type !== 2) { + if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 7) { settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type); } diff --git a/packkey/zfb-reduce.html b/packkey/zfb-reduce.html index 8817c22..63e6b86 100644 --- a/packkey/zfb-reduce.html +++ b/packkey/zfb-reduce.html @@ -185,14 +185,14 @@ .then(({ code, data, message }) => { // 使用结算 6 // 卡密做特殊处理,复制才会触发 - if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 6 && self.goods.product_type !== 2) { + if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 6) { settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type); } if (code == 200) { // 使用成功结算 7 // 直充类 上游充值返回成功 - if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 7 && self.goods.product_type !== 2) { + if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 7) { settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type); }