This commit is contained in:
yezian 2024-05-30 10:44:40 +08:00
parent a470ad980e
commit 364c86aeb4
4 changed files with 36 additions and 7 deletions

View File

@ -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({
<div className="flex flex-row">
<button
className="flex flex-row flex-1 mx-2 items-center justify-center bg-[#FF669E] rounded-lg py-2"
onClick={() => handlePurchase("alipay_h5")}
onClick={() => handlePurchase("yeepay_alipay_h5")}
>
<p className="text-white text-base ml-1">立即购买</p>
</button>

View File

@ -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() {
<div className="flex mt-auto mb-12">
<div className="basis-1/2 px-2">
<button
onClick={() => createOrder("alipay_h5")}
onClick={() => createOrder("yeepay_alipay_h5")}
className="flex flex-row h-12 w-full items-center justify-center bg-primary rounded-full py-2"
>
<svg viewBox="0 0 1024 1024" width="18" height="18">
@ -289,7 +296,7 @@ export default function Pay() {
</div>
<div className="basis-1/2 px-2">
<button
onClick={() => createOrder("wxpay_h5")}
onClick={() => createOrder("yeepay_wxpay_h5")}
className="flex flex-row h-12 w-full items-center justify-center bg-primary rounded-full py-2"
>
<svg viewBox="0 0 1228 1024" width="18" height="18">

View File

@ -89,6 +89,7 @@ export default function Vip() {
...base,
product_id: "membership",
pay_type: type,
redirect_url: type === "yeepay_wxpay_h5" ? window.location.href : "",
from: "app",
};
@ -120,6 +121,12 @@ export default function Vip() {
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;
@ -248,7 +255,7 @@ export default function Vip() {
<div className="flex flex-row justify-between">
<div className="basis-1/2 px-2">
<div
onClick={() => createOrder("alipay_h5")}
onClick={() => createOrder("yeepay_alipay_h5")}
className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full"
>
<Image src={alipay} width={22} alt="" />
@ -259,7 +266,7 @@ export default function Vip() {
</div>
<div className="basis-1/2 px-2">
<div
onClick={() => createOrder("wxpay_h5")}
onClick={() => createOrder("yeepay_wxpay_h5")}
className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full"
>
<svg viewBox="0 0 1228 1024" width="18" height="18">

View File

@ -110,6 +110,7 @@ export default function Pay({ params }) {
moment_id: parseInt(params.moment_id),
product_id: checked ? "h5_zone_superfanship" : params.product_id,
pay_type: type,
redirect_url: type === "yeepay_wxpay_h5" ? window.location.href : "",
from: "app",
};
@ -135,6 +136,12 @@ export default function Pay({ params }) {
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;
@ -307,7 +314,7 @@ export default function Pay({ params }) {
<div className="flex flex-row justify-between">
<div className="basis-1/2 px-2">
<div
onClick={() => createOrder("alipay_h5")}
onClick={() => createOrder("yeepay_alipay_h5")}
className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full"
>
<Image src={alipay} width={22} alt="" />
@ -318,7 +325,7 @@ export default function Pay({ params }) {
</div>
<div className="basis-1/2 px-2">
<div
onClick={() => createOrder("wxpay_h5")}
onClick={() => createOrder("yeepay_wxpay_h5")}
className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full"
>
<svg viewBox="0 0 1228 1024" width="18" height="18">