diff --git a/app/vip/page.jsx b/app/vip/page.jsx index f6bad47..e501bea 100644 --- a/app/vip/page.jsx +++ b/app/vip/page.jsx @@ -34,11 +34,13 @@ export default function Vip() { //检查用户是否是vip const [isVip, setIsVip] = useState(false); + const [isIos, setIsIos] = useState(false); const [name, setName] = useState(""); const [isFetching, setIsFetching] = useState(true); const getUserData = async () => { try { const base = webviewBaseRequest(); + if (base.b_dt === 1) setIsIos(true); const signature = generateSignature({ ...base, mid: base.b_mid, @@ -120,6 +122,14 @@ export default function Vip() { return; } switch (type) { + case "iap": + window.ReactNativeWebView.postMessage( + JSON.stringify({ + type: "IAP", + data: "member_forever", + }) + ); + break; case "alipay_h5": router.push(`${data.data.alipay_h5_param_str}`); break; @@ -245,35 +255,51 @@ export default function Vip() {
- 支付宝支付 -
+ {!isIos && ( ++ 支付宝支付 +
++ 微信支付 +
+- 微信支付 -
+ )} + {isIos && ( ++ 立即开通 +
+确认购买即视为同意