From e80f3ca6c96658d95a9517be78766672ed2b7d75 Mon Sep 17 00:00:00 2001 From: yezian Date: Thu, 22 Aug 2024 17:43:29 +0800 Subject: [PATCH] revert 1c5d3f0d3e7bcb7d6009ce33e2557428a59d8094 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit revert 在app内显示微信支付 --- app/pay/page.jsx | 57 ++++++++++-------------------------------------- 1 file changed, 11 insertions(+), 46 deletions(-) diff --git a/app/pay/page.jsx b/app/pay/page.jsx index c155542..56da298 100644 --- a/app/pay/page.jsx +++ b/app/pay/page.jsx @@ -9,11 +9,16 @@ import Link from "next/link"; export default function Pay() { const router = useRouter(); - - //是否显示被隐藏的支付方式 - const [isPaymentHided, setIsPaymentHided] = useState(true); - const searchParams = useSearchParams(); + const alipayBlock = () => { + if (base?.b_mid === 161) { + createOrder("alipay_h5"); + return; + } + Toast.show({ + content: "支付渠道维护升级中,请24小时后再试", + }); + }; //商品列表 const [productList, setProductList] = useState([]); @@ -24,9 +29,6 @@ export default function Pay() { //选择任意金额充值 const [customCoin, setCustomCoin] = useState({ selected: false, num: 1000 }); - //判断当前环境是否在app内 - const [isInApp, setIsInApp] = useState(true); - //任意金额充值的金币数量 const handleChangeCustomCoin = (e) => { let newValue = parseInt(e.target.value, 10); @@ -47,7 +49,6 @@ export default function Pay() { let searchParamsObj = null; let currentBaseCode = searchParams.get("base"); if (currentBaseCode) { - setIsInApp(false); let currentBase = JSON.parse(currentBaseCode); searchParamsObj = { ...currentBase }; } @@ -154,7 +155,7 @@ export default function Pay() { break; case "wxpay_h5": router.push( - `https://app.tiefen.fun/wxpay_h5/${encodeURIComponent( + `https://shop.tiefen.fun/pay/wxpay_h5/${encodeURIComponent( data.data.wxpay_h5_param_str )}` ); @@ -295,7 +296,7 @@ export default function Pay() {
-
+
createOrder("alipay_h5")} className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full" @@ -313,42 +314,6 @@ export default function Pay() {

- {isInApp && - (isPaymentHided ? ( -
-
setIsPaymentHided(false)} - className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-[#2E2E2E] rounded-full" - > - - - -

- 其他支付 -

-
-
- ) : ( -
-
createOrder("wxpay_h5")} - className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full" - > - - - -

- 微信支付 -

-
-
- ))}

确认购买即视为同意