lsc 1 tydzień temu
rodzic
commit
bec18fc665
4 zmienionych plików z 12 dodań i 3 usunięć
  1. 0 0
      dist/index.html
  2. 1 1
      dist/report.html
  3. 0 0
      dist/static/js/app.73f19586.js
  4. 11 2
      src/permission.js

Plik diff jest za duży
+ 0 - 0
dist/index.html


Plik diff jest za duży
+ 1 - 1
dist/report.html


Plik diff jest za duży
+ 0 - 0
dist/static/js/app.73f19586.js


+ 11 - 2
src/permission.js

@@ -54,12 +54,21 @@ router.beforeEach(async(to, from, next) => {
       console.log('userinfo', userinfo)
       // console.log('to', {...to} )
       if (userinfo) {
-        debugger
         console.log(store)
         if (isWeChat === '1' || to.path === '/appStoreCopy') {
           next()
         } else if (isWeChat === '2') {
-          next('/appStoreCopy')
+          const courseId = store.getters.courseId
+          const testId = store.getters.testId
+          const shareCourseId = store.getters.shareCourseId
+          await store.commit('SET_TESTID', '')
+          await store.commit('SET_COURSEID', '')
+          await store.commit('SET_SHARECOURSEID', '')
+          if (courseId || testId || shareCourseId) {
+            next()
+          } else {
+            next('/appStoreCopy')
+          }
         } else {
           next()
         }

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików