Просмотр исходного кода

Merge remote-tracking branch 'origin/dev' into dev

licailing 5 лет назад
Родитель
Сommit
57cdefeb5b
1 измененных файлов с 8 добавлено и 2 удалено
  1. 8 2
      src/main/h5/src/router/index.js

+ 8 - 2
src/main/h5/src/router/index.js

@@ -97,7 +97,10 @@ router.beforeEach((to, from, next) => {
       .dispatch("getUserInfo")
       .dispatch("getUserInfo")
       .then(() => {
       .then(() => {
         if (to.name === "inspectorList") {
         if (to.name === "inspectorList") {
-          if (store.state.role === "ROLE_EXPERT") {
+          if (
+            store.state.role === "ROLE_EXPERT" ||
+            store.state.role === "ROLE_DISTRICT_STAFF"
+          ) {
             next("/expertList");
             next("/expertList");
           } else {
           } else {
             next();
             next();
@@ -113,7 +116,10 @@ router.beforeEach((to, from, next) => {
   } else if (store.state.userInfo && to.name === "inspectorList") {
   } else if (store.state.userInfo && to.name === "inspectorList") {
     if (store.state.role === "ROLE_SUPERVISOR") {
     if (store.state.role === "ROLE_SUPERVISOR") {
       next();
       next();
-    } else if (store.state.role === "ROLE_EXPERT") {
+    } else if (
+      store.state.role === "ROLE_EXPERT" ||
+      store.state.role === "ROLE_DISTRICT_STAFF"
+    ) {
       next("/expertList");
       next("/expertList");
     }
     }
   } else if (!to.matched.length) {
   } else if (!to.matched.length) {