lsc 3 days ago
parent
commit
afccd5e13d
4 changed files with 11 additions and 3 deletions
  1. 0 0
      dist/index.html
  2. 1 1
      dist/report.html
  3. 0 0
      dist/static/js/app.217501d9.js
  4. 10 2
      src/permission.js

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 1 - 1
dist/report.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.217501d9.js


+ 10 - 2
src/permission.js

@@ -117,13 +117,21 @@ router.beforeEach(async(to, from, next) => {
       // in the free login whitelist, go directly
       next()
     } else {
+      const courseId = store.getters.courseId
+      const testId = store.getters.testId
+      const shareCourseId = store.getters.shareCourseId
+
       // 检查是否是微信授权回调
-      if (window.location.href.indexOf('login') !== -1 && window.location.href.indexOf('login2') === -1) {
+      if (courseId || testId || shareCourseId) {
+        next(`/login2?redirect=${to.path}`)
+        NProgress.done()
+      } else if (window.location.href.indexOf('login') !== -1 && window.location.href.indexOf('login2') === -1) {
         // 微信授权回调,允许访问
         next('/login')
+        NProgress.done()
       } else {
         //   // other pages that do not have permission to access are redirected to the login page.
-        next(`/login?redirect=${to.path}`)
+        next(`/login2?redirect=${to.path}`)
         NProgress.done()
       }
     }

Some files were not shown because too many files changed in this diff