版本发布

This commit is contained in:
icssoa
2025-07-21 16:47:04 +08:00
parent 1abed7a2e1
commit 6d8193880a
307 changed files with 41718 additions and 0 deletions

22
router/index.ts Normal file
View File

@@ -0,0 +1,22 @@
import { router, useStore } from "@/cool";
const ignoreToken = [
"/pages/index/home",
"/pages/index/my",
"/pages/user/login",
"/pages/user/doc"
];
router.beforeEach((to, next) => {
const { user } = useStore();
if (ignoreToken.includes(to.path) || to.path.startsWith("/pages/demo")) {
next();
} else {
if (!user.isNull()) {
next();
} else {
router.login();
}
}
});