From 3c0c95ffca0c424836683ebeb2d84c77e72c7be9 Mon Sep 17 00:00:00 2001
From: zhangxiaoxu123456 <zxx19900626>
Date: 星期五, 29 四月 2022 18:13:38 +0800
Subject: [PATCH] 社会收支表接口

---
 src/router/index.js |   42 +++++++++++++++++++++---------------------
 1 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/router/index.js b/src/router/index.js
index 6a92bc4..d3f926f 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -39,10 +39,11 @@
 router.beforeEach((to, from, next) => {
    const token = store.getters.token
   if(to.name !== 'login' && !token) {
-    next({name: 'login'})
-  }else {
-    next()
-  }
+      next({name: 'login'})
+    }else {
+      next()
+    }
+
     // if (to.path == '/login') {
     //     removeStore('userinfo');
     // }
@@ -61,30 +62,29 @@
     //         next({ path: '/login' })
     //     }, 1000)
     // }
-
+    //
     // userinfo.expire_time = toTime + 1000 * 60 * 60 * 2
     // localStorage.setItem("userinfo", JSON.stringify(userinfo))
-
+    //
     // 椤甸潰涓嶅瓨鍦�
     // console.log(to)
-    if (to.matched.length == 0) {
-        next({ path: '/404' })
-    }
-
-    startTime = new Date().getTime()
-
+    // if (to.matched.length == 0) {
+    //     next({ path: '/404' })
+    // }
+    //
+    // startTime = new Date().getTime()
+    //
     // NProgress.start();
-    next()
 })
 
 router.afterEach((to) => {
-    if (passPath.indexOf(to.path) === -1) {
-        // var consumingTime = new Date().getTime() - startTime
-        // notification.info({
-        //     message: '姝ゆ鍔犺浇椤甸潰娑堣�楁椂闂�',
-        //     duration:2,
-        //     description: `鑰楁椂${consumingTime / 1000}绉抈,
-        // });
-    }
+    // if (passPath.indexOf(to.path) === -1) {
+    //     var consumingTime = new Date().getTime() - startTime
+    //     notification.info({
+    //         message: '姝ゆ鍔犺浇椤甸潰娑堣�楁椂闂�',
+    //         duration:2,
+    //         description: `鑰楁椂${consumingTime / 1000}绉抈,
+    //     });
+    // }
     // NProgress.done();
 });

--
Gitblit v1.9.1