zangkai пре 5 година
родитељ
комит
d71cbc3ca7
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      frontend_web/src/plugin/axios/index.js

+ 4 - 1
frontend_web/src/plugin/axios/index.js

@@ -19,6 +19,9 @@ function noticeMsg (dataAxios, type) {
   if (!dataAxios.msg) {
     return
   }
+  if (!dataAxios.message) {
+    return
+  }
   Message({
     message: dataAxios.msg,
     type: type,
@@ -67,7 +70,7 @@ service.interceptors.request.use(
     }
     loading.show(config)
     // 在请求发送之前做一些处理
-     config.headers['Tenant'] = process.env.VUE_APP_TENANT
+    config.headers['Tenant'] = process.env.VUE_APP_TENANT
     const token = util.cookies.get('token')
     if (token !== undefined) {
       // 让每个请求携带token-- ['Authorization']为自定义key 请根据实际情况自行修改