From 8d172da89e4f127d4a48df914a8ee1407f7538f2 Mon Sep 17 00:00:00 2001 From: yezian Date: Wed, 12 Jun 2024 22:15:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=87=91=E5=B8=81=E6=94=AF?= =?UTF-8?q?=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/vip/page.jsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/app/vip/page.jsx b/app/vip/page.jsx index e501bea..2210241 100644 --- a/app/vip/page.jsx +++ b/app/vip/page.jsx @@ -122,6 +122,22 @@ export default function Vip() { return; } 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": window.ReactNativeWebView.postMessage( JSON.stringify({ @@ -290,7 +306,7 @@ export default function Vip() {
createOrder("iap")} + onClick={() => createOrder("coin")} className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full" >