diff --git a/app/test/page.js b/app/test/page.js new file mode 100644 index 0000000..ffd7bca --- /dev/null +++ b/app/test/page.js @@ -0,0 +1,13 @@ +"use client"; + +import React, { useEffect } from "react"; +import { useRouter } from "next/navigation"; + +export default function WxpayH5({ params }) { + const router = useRouter(); + useEffect(() => { + const redirect_uri = decodeURIComponent(params.url); + router.replace(redirect_uri); + }, []); + return
; +} \ No newline at end of file diff --git a/components/WithAuth/index.js b/components/WithAuth/index.js index 681fe1e..7e1f19f 100644 --- a/components/WithAuth/index.js +++ b/components/WithAuth/index.js @@ -23,6 +23,9 @@ export default function WithAuth(WrappedComponent) { const checkLogin = async () => { const hasToken = await get("token"); // console.log("hasToken", hasToken); + if(pathname.includes("test")){ + return + } if (hasToken) { const currentIsLogin = await checkAuth(); if (!currentIsLogin) {