zhuliu 9 mesiacov pred
rodič
commit
a3cf23d0f9
2 zmenil súbory, kde vykonal 8 pridanie a 8 odobranie
  1. 2 2
      src/router/index.js
  2. 6 6
      src/views/login/index.vue

+ 2 - 2
src/router/index.js

@@ -777,8 +777,8 @@ router.beforeEach(async (to, from, next) => {
     }
 
     //单个页面设置权限
-    if(to.path=='/project/patentCollection'){
-      var projectId = to.query.id
+    if(to.path=='/project/patentCollection' || to.path=='/reportDetails'){
+      var projectId = to.query.id || to.query.projectId
       if(!projectId){
         next({ path: '/404' })
         return

+ 6 - 6
src/views/login/index.vue

@@ -268,17 +268,17 @@ export default {
           if(redirectUrl){
             redirectUrl = JSON.parse(redirectUrl)
             localStorage.removeItem('redirectUrl')
-            if(redirectUrl.userName && redirectUrl.userName != this.ruleForm.username){
-              this.$router.push({
-                path: '/home'
-              })
-            }else{
+            // if(redirectUrl.userName && redirectUrl.userName != this.ruleForm.username){
+            //   this.$router.push({
+            //     path: '/home'
+            //   })
+            // }else{
               this.$router.replace({
                 path:redirectUrl.path!='/login'?redirectUrl.path:'/home',
                 query:redirectUrl.query,
                 params:redirectUrl.params
               })
-            }
+            // }
           }else{
             this.$router.push({
               path: '/home'