natasha 3 gadi atpakaļ
vecāks
revīzija
01fc426512
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      src/permission.js

+ 2 - 2
src/permission.js

@@ -18,9 +18,9 @@ router.beforeEach(async(to, from, next) => {
         //next();
     NProgress.done()
     const hasToken = getToken()
-    if (hasToken || to.path === '/BookBrowsing') {
+    if (hasToken || to.path === '/BookBrowsing' || to.path === '/courseview') {
         let config = getConfig();
-        if (config || to.path === '/BookBrowsing') {
+        if (config || to.path === '/BookBrowsing' || to.path === '/courseview') {
             if (to.path === '/login') {
                 // if is logged in, redirect to the home page
                 next({ path: '/EnterSys' })