From 364c86aeb4cd537899198fa76ad4a0dc508f87d4 Mon Sep 17 00:00:00 2001 From: yezian Date: Thu, 30 May 2024 10:44:40 +0800 Subject: [PATCH 1/2] yeepay --- app/[user_id]/_components/WechatBar/index.jsx | 10 +++++++++- app/pay/page.jsx | 11 +++++++++-- app/vip/page.jsx | 11 +++++++++-- app/zone/pay/[zid]/[product_id]/[moment_id]/page.jsx | 11 +++++++++-- 4 files changed, 36 insertions(+), 7 deletions(-) diff --git a/app/[user_id]/_components/WechatBar/index.jsx b/app/[user_id]/_components/WechatBar/index.jsx index 59713a3..daef9b9 100644 --- a/app/[user_id]/_components/WechatBar/index.jsx +++ b/app/[user_id]/_components/WechatBar/index.jsx @@ -44,6 +44,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 +65,12 @@ export default function WechatBar({ } //如果金币不够情况 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(`${temData.data.alipay_h5_param_str}`); break; @@ -140,7 +148,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() {