9 lines
216 B
TypeScript
9 lines
216 B
TypeScript
export default defineNuxtRouteMiddleware(async (to, from) => {
|
|
const auth = useCookie("auth");
|
|
if (auth.value == "brianling") {
|
|
} else {
|
|
alert("未登录");
|
|
return navigateTo("/login");
|
|
}
|
|
});
|