增加金币支付
This commit is contained in:
parent
2d641e73b1
commit
8d172da89e
|
@ -122,6 +122,22 @@ export default function Vip() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case "coin":
|
||||||
|
window.ReactNativeWebView.postMessage(
|
||||||
|
JSON.stringify({
|
||||||
|
type: "COINPAY",
|
||||||
|
data: {
|
||||||
|
url: "/api/vas/create_order",
|
||||||
|
body: { product_id: data.data.product.id },
|
||||||
|
product: data.data.product.name,
|
||||||
|
coinPrice: data.data.product.real_coin_price,
|
||||||
|
validity: "永久",
|
||||||
|
info: "",
|
||||||
|
onPurchaseDone: () => {},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
|
break;
|
||||||
case "iap":
|
case "iap":
|
||||||
window.ReactNativeWebView.postMessage(
|
window.ReactNativeWebView.postMessage(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
|
@ -290,7 +306,7 @@ export default function Vip() {
|
||||||
<div className="flex flex-row justify-between">
|
<div className="flex flex-row justify-between">
|
||||||
<div className="w-full px-2">
|
<div className="w-full px-2">
|
||||||
<div
|
<div
|
||||||
onClick={() => createOrder("iap")}
|
onClick={() => createOrder("coin")}
|
||||||
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"
|
||||||
>
|
>
|
||||||
<p className="text-white text-base font-medium whitespace-nowrap">
|
<p className="text-white text-base font-medium whitespace-nowrap">
|
||||||
|
|
Loading…
Reference in New Issue