// default.global.ts
// 路由守卫
export default function defineNuxtRouterMiddleware(to: any, from: any) {
  if (!process.server) {
    // const tokenKey = useCookie("tokenKey");
    // if (to.path.indexOf('/home/') > -1) {
    //   if (!tokenKey.value) {
    //     return navigateTo({ path: "/login", query: { redirect: from.fullPath }, replace: true });
    //   }
    // }
    // if (tokenKey.value && (to.path == "/login" || to.path == '/register' || to.path == "/forgetPass")) {
    //   return navigateTo({ path: "/"});
    // }
  }
}
