yeepay
This commit is contained in:
parent
a470ad980e
commit
364c86aeb4
|
@ -44,6 +44,8 @@ export default function WechatBar({
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
uid: streamerMid,
|
uid: streamerMid,
|
||||||
pay_type: type,
|
pay_type: type,
|
||||||
|
redirect_url:
|
||||||
|
type === "yeepay_wxpay_h5" ? window.location.href : "",
|
||||||
...base,
|
...base,
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
@ -63,6 +65,12 @@ export default function WechatBar({
|
||||||
}
|
}
|
||||||
//如果金币不够情况
|
//如果金币不够情况
|
||||||
switch (type) {
|
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":
|
case "alipay_h5":
|
||||||
router.push(`${temData.data.alipay_h5_param_str}`);
|
router.push(`${temData.data.alipay_h5_param_str}`);
|
||||||
break;
|
break;
|
||||||
|
@ -140,7 +148,7 @@ export default function WechatBar({
|
||||||
<div className="flex flex-row">
|
<div className="flex flex-row">
|
||||||
<button
|
<button
|
||||||
className="flex flex-row flex-1 mx-2 items-center justify-center bg-[#FF669E] rounded-lg py-2"
|
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>
|
<p className="text-white text-base ml-1">立即购买</p>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -98,6 +98,7 @@ export default function Pay() {
|
||||||
product_id: customCoin.selected ? "h5_custom_coin" : selectedPrice.id,
|
product_id: customCoin.selected ? "h5_custom_coin" : selectedPrice.id,
|
||||||
custom_coins: customCoin.selected ? customCoin.num : 0,
|
custom_coins: customCoin.selected ? customCoin.num : 0,
|
||||||
pay_type: type,
|
pay_type: type,
|
||||||
|
redirect_url: type === "yeepay_wxpay_h5" ? window.location.href : "",
|
||||||
from: "app",
|
from: "app",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -129,6 +130,12 @@ export default function Pay() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (type) {
|
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":
|
case "alipay_h5":
|
||||||
router.push(`${data.data.alipay_h5_param_str}`);
|
router.push(`${data.data.alipay_h5_param_str}`);
|
||||||
break;
|
break;
|
||||||
|
@ -275,7 +282,7 @@ export default function Pay() {
|
||||||
<div className="flex mt-auto mb-12">
|
<div className="flex mt-auto mb-12">
|
||||||
<div className="basis-1/2 px-2">
|
<div className="basis-1/2 px-2">
|
||||||
<button
|
<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"
|
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">
|
<svg viewBox="0 0 1024 1024" width="18" height="18">
|
||||||
|
@ -289,7 +296,7 @@ export default function Pay() {
|
||||||
</div>
|
</div>
|
||||||
<div className="basis-1/2 px-2">
|
<div className="basis-1/2 px-2">
|
||||||
<button
|
<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"
|
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">
|
<svg viewBox="0 0 1228 1024" width="18" height="18">
|
||||||
|
|
|
@ -89,6 +89,7 @@ export default function Vip() {
|
||||||
...base,
|
...base,
|
||||||
product_id: "membership",
|
product_id: "membership",
|
||||||
pay_type: type,
|
pay_type: type,
|
||||||
|
redirect_url: type === "yeepay_wxpay_h5" ? window.location.href : "",
|
||||||
from: "app",
|
from: "app",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -120,6 +121,12 @@ export default function Vip() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (type) {
|
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":
|
case "alipay_h5":
|
||||||
router.push(`${data.data.alipay_h5_param_str}`);
|
router.push(`${data.data.alipay_h5_param_str}`);
|
||||||
break;
|
break;
|
||||||
|
@ -248,7 +255,7 @@ export default function Vip() {
|
||||||
<div className="flex flex-row justify-between">
|
<div className="flex flex-row justify-between">
|
||||||
<div className="basis-1/2 px-2">
|
<div className="basis-1/2 px-2">
|
||||||
<div
|
<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"
|
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="" />
|
<Image src={alipay} width={22} alt="" />
|
||||||
|
@ -259,7 +266,7 @@ export default function Vip() {
|
||||||
</div>
|
</div>
|
||||||
<div className="basis-1/2 px-2">
|
<div className="basis-1/2 px-2">
|
||||||
<div
|
<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"
|
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">
|
<svg viewBox="0 0 1228 1024" width="18" height="18">
|
||||||
|
|
|
@ -110,6 +110,7 @@ export default function Pay({ params }) {
|
||||||
moment_id: parseInt(params.moment_id),
|
moment_id: parseInt(params.moment_id),
|
||||||
product_id: checked ? "h5_zone_superfanship" : params.product_id,
|
product_id: checked ? "h5_zone_superfanship" : params.product_id,
|
||||||
pay_type: type,
|
pay_type: type,
|
||||||
|
redirect_url: type === "yeepay_wxpay_h5" ? window.location.href : "",
|
||||||
from: "app",
|
from: "app",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -135,6 +136,12 @@ export default function Pay({ params }) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (type) {
|
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":
|
case "alipay_h5":
|
||||||
router.push(`${data.data.alipay_h5_param_str}`);
|
router.push(`${data.data.alipay_h5_param_str}`);
|
||||||
break;
|
break;
|
||||||
|
@ -307,7 +314,7 @@ export default function Pay({ params }) {
|
||||||
<div className="flex flex-row justify-between">
|
<div className="flex flex-row justify-between">
|
||||||
<div className="basis-1/2 px-2">
|
<div className="basis-1/2 px-2">
|
||||||
<div
|
<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"
|
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="" />
|
<Image src={alipay} width={22} alt="" />
|
||||||
|
@ -318,7 +325,7 @@ export default function Pay({ params }) {
|
||||||
</div>
|
</div>
|
||||||
<div className="basis-1/2 px-2">
|
<div className="basis-1/2 px-2">
|
||||||
<div
|
<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"
|
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">
|
<svg viewBox="0 0 1228 1024" width="18" height="18">
|
||||||
|
|
Loading…
Reference in New Issue