lsc 6 일 전
부모
커밋
afccd5e13d
4개의 변경된 파일11개의 추가작업 그리고 3개의 파일을 삭제
  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

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/index.html


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/report.html


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 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()
       }
     }

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.