lsc 2 년 전
부모
커밋
97b19a7f9f
6개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 0 0
      dist/index.html
  2. 1 1
      dist/report.html
  3. 0 0
      dist/static/js/app.b630fd79.js
  4. 0 0
      dist/static/js/app.dc56117b.js
  5. 2 2
      src/permission.js
  6. 2 1
      src/store/getters.js

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


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


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


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


+ 2 - 2
src/permission.js

@@ -25,8 +25,8 @@ router.beforeEach(async(to, from, next) => {
       next({ path: '/' })
       NProgress.done()
     } else {
-      const hasRoles = store.getters.roles && store.getters.roles.length > 0
-      if (hasRoles) {
+      const userinfo = store.getters.userinfo && Object.keys(store.getters.userinfo).length > 0
+      if (userinfo) {
         next()
       } else {
         try {

+ 2 - 1
src/store/getters.js

@@ -1,4 +1,5 @@
 const getters = {
-  userName: state => state.app.userName
+  userName: state => state.app.userName,
+  userinfo: state => state.user.userinfo
 }
 export default getters

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