添加test页面

This commit is contained in:
al 2024-08-12 18:02:42 +08:00
parent 7103f22de2
commit a48641fe7c
2 changed files with 16 additions and 0 deletions

13
app/test/page.js Normal file
View File

@ -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 <section className="bg-white"></section>;
}

View File

@ -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) {