Browse Source

'修改接口地址'

hjs 1 year ago
parent
commit
d5ddfb0c4e
5 changed files with 7 additions and 4 deletions
  1. 1 0
      .env.development
  2. 1 0
      .gitignore
  3. BIN
      back.zip
  4. 3 3
      src/router/index.js
  5. 2 1
      src/utils/request.js

+ 1 - 0
.env.development

@@ -2,4 +2,5 @@
 ENV = 'development'
 
 # base api   http://192.168.11.10:9100/yx-fyzd https://noise.hz-hanghui.com:8088/yx-fyzd
+# VUE_APP_BASE_API = 'https://tx.hz-hanghui.com:8088/yx-fyzd'
 VUE_APP_BASE_API = 'http://192.168.11.11:9100/yx-fyzd'

+ 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
@@ -173,7 +173,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' }
       }
     ]
   },
@@ -209,7 +209,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
 })