diff --git a/app/pay/page.jsx b/app/pay/page.jsx index 2d5f803..be2a05b 100644 --- a/app/pay/page.jsx +++ b/app/pay/page.jsx @@ -128,6 +128,28 @@ export default function Pay() { } }; + //跳转联系客服 + const handleContact = () => { + if (navigator.userAgent.includes("FromWebview")) { + window.ReactNativeWebView.postMessage( + JSON.stringify({ + type: "NAVIGATE", + data: { + page: "MessageDetail", + params: { + mid: 1, + }, + }, + }) + ); + } else { + Toast.show({ + content: "请下载app联系客服充值", + }); + } + document.getElementById("manual_pay_modal").close(); + }; + const PriceItem = ({ item }) => { const handleClickPrice = (item) => { setSelectedPrice(item); @@ -254,7 +276,7 @@ export default function Pay() {
+ +
+

+ 人工充值 +

+

+ 请联系人工客服进行充值,单笔金额不低于500人民币 +

+
+ +
+ +
+
+
+
); } diff --git a/app/vip/page.jsx b/app/vip/page.jsx index 0774abd..b9da1c6 100644 --- a/app/vip/page.jsx +++ b/app/vip/page.jsx @@ -88,7 +88,6 @@ export default function Vip() { } ); const data = await response.json(); - console.log(data); if (data.ret === -1) { Toast.show({ content: data.msg, @@ -115,6 +114,27 @@ export default function Vip() { } }; + //跳转联系客服 + const handleContact = () => { + if (navigator.userAgent.includes("FromWebview")) { + window.ReactNativeWebView.postMessage( + JSON.stringify({ + type: "NAVIGATE", + data: { + page: "MessageDetail", + params: { + mid: 1, + }, + }, + }) + ); + } else { + Toast.show({ + content: "请下载app联系客服充值", + }); + } + }; + if (isFetching) { return (
@@ -233,17 +253,12 @@ export default function Vip() {
createOrder("wxpay_native")} + onClick={handleContact} className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full" > - - - +

- 微信支付 + 联系人工充值