diff --git a/app/pay/page.jsx b/app/pay/page.jsx index 28e6538..b8aa4da 100644 --- a/app/pay/page.jsx +++ b/app/pay/page.jsx @@ -162,11 +162,17 @@ export default function Pay() { router.push(`${data.data.alipay_h5_param_str}`); break; case "wxpay_h5": - router.push( - `https://yibowanhe.top?url=${encodeURIComponent( + if (base.b_ch === "h5") { + window.parent.location.href = `https://yibowanhe.top?url=${encodeURIComponent( data.data.wxpay_h5_param_str - )}` - ); + )}`; + } else { + router.push( + `https://yibowanhe.top?url=${encodeURIComponent( + data.data.wxpay_h5_param_str + )}` + ); + } break; default: router.push(`${data.data.alipay_h5_param_str}`); @@ -244,11 +250,17 @@ export default function Pay() { router.push(`${data.data.alipay_h5_param_str}`); break; case "wxpay_h5": - router.push( - `https://yibowanhe.top?url=${encodeURIComponent( + if (base.b_ch === "h5") { + window.parent.location.href = `https://yibowanhe.top?url=${encodeURIComponent( data.data.wxpay_h5_param_str - )}` - ); + )}`; + } else { + router.push( + `https://yibowanhe.top?url=${encodeURIComponent( + data.data.wxpay_h5_param_str + )}` + ); + } break; default: router.push(`${data.data.alipay_h5_param_str}`); diff --git a/app/vip/page.jsx b/app/vip/page.jsx index 44cfbb0..ceb27b5 100644 --- a/app/vip/page.jsx +++ b/app/vip/page.jsx @@ -132,11 +132,17 @@ export default function Vip() { router.push(`${data.data.alipay_h5_param_str}`); break; case "wxpay_h5": - router.push( - `https://yibowanhe.top?url=${encodeURIComponent( + if (base.b_ch === "h5") { + window.parent.location.href = `https://yibowanhe.top?url=${encodeURIComponent( data.data.wxpay_h5_param_str - )}` - ); + )}`; + } else { + router.push( + `https://yibowanhe.top?url=${encodeURIComponent( + data.data.wxpay_h5_param_str + )}` + ); + } break; default: router.push(`${data.data.alipay_h5_param_str}`); @@ -200,11 +206,17 @@ export default function Vip() { router.push(`${data.data.alipay_h5_param_str}`); break; case "wxpay_h5": - router.push( - `https://yibowanhe.top?url=${encodeURIComponent( + if (base.b_ch === "h5") { + window.parent.location.href = `https://yibowanhe.top?url=${encodeURIComponent( data.data.wxpay_h5_param_str - )}` - ); + )}`; + } else { + router.push( + `https://yibowanhe.top?url=${encodeURIComponent( + data.data.wxpay_h5_param_str + )}` + ); + } break; default: router.push(`${data.data.alipay_h5_param_str}`);