diff --git a/app/[user_id]/_components/WechatBar/index.jsx b/app/[user_id]/_components/WechatBar/index.jsx
index 59713a3..3da9a67 100644
--- a/app/[user_id]/_components/WechatBar/index.jsx
+++ b/app/[user_id]/_components/WechatBar/index.jsx
@@ -32,6 +32,7 @@ export default function WechatBar({
const signature = generateSignature({
uid: streamerMid,
pay_type: type,
+ redirect_url: type === "yeepay_wxpay_h5" ? window.location.href : "",
...base,
});
const response = await fetch(
@@ -44,6 +45,8 @@ export default function WechatBar({
body: JSON.stringify({
uid: streamerMid,
pay_type: type,
+ redirect_url:
+ type === "yeepay_wxpay_h5" ? window.location.href : "",
...base,
}),
}
@@ -63,6 +66,12 @@ export default function WechatBar({
}
//如果金币不够情况
switch (type) {
+ case "yeepay_alipay_h5":
+ router.push(`${temData.data.yeepay_alipay_h5_param_str}`);
+ break;
+ case "yeepay_wxpay_h5":
+ router.push(`${temData.data.yeepay_wxpay_h5_param_str}`);
+ break;
case "alipay_h5":
router.push(`${temData.data.alipay_h5_param_str}`);
break;
@@ -140,7 +149,7 @@ export default function WechatBar({
diff --git a/app/pay/page.jsx b/app/pay/page.jsx
index 8646dfe..8eeeb51 100644
--- a/app/pay/page.jsx
+++ b/app/pay/page.jsx
@@ -98,6 +98,7 @@ export default function Pay() {
product_id: customCoin.selected ? "h5_custom_coin" : selectedPrice.id,
custom_coins: customCoin.selected ? customCoin.num : 0,
pay_type: type,
+ redirect_url: type === "yeepay_wxpay_h5" ? window.location.href : "",
from: "app",
};
@@ -129,6 +130,12 @@ export default function Pay() {
return;
}
switch (type) {
+ case "yeepay_alipay_h5":
+ router.push(`${data.data.yeepay_alipay_h5_param_str}`);
+ break;
+ case "yeepay_wxpay_h5":
+ router.push(`${data.data.yeepay_wxpay_h5_param_str}`);
+ break;
case "alipay_h5":
router.push(`${data.data.alipay_h5_param_str}`);
break;
@@ -275,7 +282,7 @@ export default function Pay() {