lsc 2 yıl önce
ebeveyn
işleme
321ebb376a
4 değiştirilmiş dosya ile 5 ekleme ve 3 silme
  1. 0 0
      dist/index.html
  2. 1 1
      dist/report.html
  3. 0 0
      dist/static/js/app.ef179ec0.js
  4. 4 2
      src/permission.js

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/index.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
dist/report.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/js/app.ef179ec0.js


+ 4 - 2
src/permission.js

@@ -19,7 +19,7 @@ router.beforeEach(async(to, from, next) => {
   const hasToken = getToken()
 
   if (to.query.courseid) {
-    store.commit('app/SET_COURSEID', to.query.courseid)
+    await store.commit('app/SET_COURSEID', to.query.courseid)
   }
   if (hasToken) {
     if (to.path === '/login') {
@@ -32,7 +32,9 @@ router.beforeEach(async(to, from, next) => {
       console.log(store.getters)
       console.log(userinfo)
       if (userinfo) {
-        next()
+        const courseId = store.getters.courseId
+
+        next({ ...to, query: { courseid: courseId }})
       } else {
         try {
           // 获取用户信息

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor