From 614aa92b6edb2aeff653cf43ee6a849f962acead Mon Sep 17 00:00:00 2001 From: yezian Date: Wed, 12 Jun 2024 22:33:31 +0800 Subject: [PATCH] debug --- app/vip/page.jsx | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/app/vip/page.jsx b/app/vip/page.jsx index 2210241..54de321 100644 --- a/app/vip/page.jsx +++ b/app/vip/page.jsx @@ -100,6 +100,24 @@ export default function Vip() { return; } + if (type === "coin") { + window.ReactNativeWebView.postMessage( + JSON.stringify({ + type: "COINPAY", + data: { + url: "/api/vas/create_order", + body: { product_id: "membership" }, + product: "会员资格", + coinPrice: 100, + validity: "永久", + info: "", + onPurchaseDone: () => {}, + }, + }) + ); + return; + } + setIsLoading(true); const signature = generateSignature(body); @@ -122,22 +140,6 @@ 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({