diff --git a/app/pay/page.jsx b/app/pay/page.jsx index 56da298..30ad708 100644 --- a/app/pay/page.jsx +++ b/app/pay/page.jsx @@ -9,16 +9,11 @@ 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([]); @@ -154,11 +149,7 @@ export default function Pay() { router.push(`${data.data.alipay_h5_param_str}`); break; case "wxpay_h5": - router.push( - `https://shop.tiefen.fun/pay/wxpay_h5/${encodeURIComponent( - data.data.wxpay_h5_param_str - )}` - ); + router.push(`${data.data.wxpay_h5_param_str}`); break; default: router.push(`${data.data.alipay_h5_param_str}`); @@ -296,7 +287,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" @@ -314,6 +305,41 @@ export default function Pay() {

+ {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" + > + + + +

+ 微信支付 +

+
+
+ )}

确认购买即视为同意 diff --git a/app/vip/page.jsx b/app/vip/page.jsx index 1a4cc67..48a00ab 100644 --- a/app/vip/page.jsx +++ b/app/vip/page.jsx @@ -8,16 +8,11 @@ import { Toast } from "antd-mobile"; import { useRouter, useSearchParams } from "next/navigation"; export default function Vip() { 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小时后再试", - }); - }; //检查用户是否是vip const [isVip, setIsVip] = useState(false); @@ -138,11 +133,7 @@ export default function Vip() { router.push(`${data.data.alipay_h5_param_str}`); break; case "wxpay_h5": - router.push( - `https://shop.tiefen.fun/pay/wxpay_h5/${encodeURIComponent( - data.data.wxpay_h5_param_str - )}` - ); + router.push(`${data.data.wxpay_h5_param_str}`); break; default: router.push(`${data.data.alipay_h5_param_str}`); @@ -304,7 +295,7 @@ export default function Vip() {

-
+
createOrder("alipay_h5")} className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full" @@ -322,6 +313,41 @@ export default function Vip() {

+ {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" + > + + + +

+ 微信支付 +

+
+
+ )}

确认购买即视为同意 diff --git a/app/zone/pay/[zid]/[product_id]/[moment_id]/page.jsx b/app/zone/pay/[zid]/[product_id]/[moment_id]/page.jsx index a9bb355..0cbf1f5 100644 --- a/app/zone/pay/[zid]/[product_id]/[moment_id]/page.jsx +++ b/app/zone/pay/[zid]/[product_id]/[moment_id]/page.jsx @@ -10,6 +10,10 @@ import { useRouter, useSearchParams } from "next/navigation"; export default function Pay({ params }) { const router = useRouter(); + + //是否显示被隐藏的支付方式 + const [isPaymentHided, setIsPaymentHided] = useState(true); + const searchParams = useSearchParams(); //当前选购的商品数据 const [data, setData] = useState({}); @@ -157,11 +161,7 @@ export default function Pay({ params }) { router.push(`${data.data.alipay_h5_param_str}`); break; case "wxpay_h5": - router.push( - `https://shop.tiefen.fun/pay/wxpay_h5/${encodeURIComponent( - data.data.wxpay_h5_param_str - )}` - ); + router.push(`${data.data.wxpay_h5_param_str}`); break; default: router.push(`${data.data.alipay_h5_param_str}`); @@ -327,7 +327,7 @@ export default function Pay({ params }) {

-
+
createOrder("alipay_h5")} className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full" @@ -345,6 +345,41 @@ export default function Pay({ params }) {

+ {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" + > + + + +

+ 微信支付 +

+
+
+ )}

确认购买即视为同意