修复流量统计

This commit is contained in:
qaq
2025-06-18 14:41:25 +08:00
parent c3077b2922
commit 6df61832b9
9 changed files with 554 additions and 88 deletions
+3 -1
View File
@@ -5,6 +5,7 @@ import VueRouter from 'vue-router';
import Home from "@/views/Home.vue";
import Login from "@/views/Login.vue";
import ChangeAccountPassword from "@/views/ChangePassword.vue";
import Index from "@/views/Index";
import User from "@/views/User";
import Node from "@/views/node";
@@ -19,6 +20,7 @@ Vue.use(VueRouter);
const routes = [
{path: '/', redirect: '/login'},
{path: '/login', component: Login},
{path: '/change-password', component: ChangeAccountPassword},
{
path: '/home', component: Home, redirect: '/index', children: [
{path: '/index', component: Index},
@@ -38,7 +40,7 @@ const router = new VueRouter({
})
router.beforeEach((to, from, next) => {
if (to.path === '/login') return next();
if (to.path === '/login' || to.path === '/change-password') return next();
const tokenStr = localStorage.getItem('token')
if (!tokenStr) {
return next('/login')