Browse Source

楼宇审核权限

张佳燕 1 year ago
parent
commit
d9b71ea307
4 changed files with 6 additions and 4 deletions
  1. 1 0
      .gitignore
  2. BIN
      back.zip
  3. 3 3
      src/router/index.js
  4. 2 1
      src/utils/request.js

+ 1 - 0
.gitignore

@@ -7,6 +7,7 @@ yarn-debug.log*
 yarn-error.log*
 package-lock.json
 tests/**/coverage/
+back.zip
 
 # Editor directories and files
 .idea

BIN
back.zip


+ 3 - 3
src/router/index.js

@@ -24,7 +24,7 @@ import Layout from '@/layout'
     activeMenu: '/example/list'  if set path, the sidebar will highlight the path you set
   }
  */
-
+// 1、管理员;2、省级总帐号;3、升级;4、市级;5、区级(普通账号);99、企业(楼宇)
 /**
  * constantRoutes
  * a base page that does not have permission requirements
@@ -184,7 +184,7 @@ export const constantRoutes = [
         path: 'index',
         name: 'visitors_record',
         component: () => import('@/views/visitors_record/index'),
-        meta: { title: '访客记录', role: [99], icon: 'el-icon-date' }
+        meta: { title: '访客记录', role: [1, 5, 99], icon: 'el-icon-date' }
       }
     ]
   },
@@ -220,7 +220,7 @@ export const constantRoutes = [
         path: 'index',
         name: 'exam_list',
         component: () => import('@/views/exam_list/index'),
-        meta: { title: '考试列表', role: [1, 2, 3, 4, 5,99], visitorType: ['2'], icon: 'el-icon-s-order' }
+        meta: { title: '考试列表', role: [1, 2, 3, 4, 5, 99], visitorType: ['2'], icon: 'el-icon-s-order' }
       }
     ]
   },

+ 2 - 1
src/utils/request.js

@@ -17,9 +17,10 @@ function showErr(res, duration) {
     }
 }
 
+const baseURLStr = window.g.ApiUrl
 // create an axios instance
 const service = axios.create({
-  baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
+  baseURL: baseURLStr, // url = base url + request url
   // withCredentials: true, // send cookies when cross-domain requests
   timeout: 200000 // request timeout
 })