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({