From ad36068045478c168fc3bb99f058845db361968d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=9D=96=E5=8D=9A?= Date: Tue, 25 Mar 2025 13:44:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(request):=20=E6=B7=BB=E5=8A=A0=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E8=AF=B7=E6=B1=82=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 axios 默认 headers 中添加 X-Tenant-ID 和 Request-Method-Name - X-Tenant-ID 设置为 1 - Request-Method-Name 设置为 login --- openhis-ui-vue3/src/utils/request.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openhis-ui-vue3/src/utils/request.js b/openhis-ui-vue3/src/utils/request.js index 3a9be89d..d3118339 100644 --- a/openhis-ui-vue3/src/utils/request.js +++ b/openhis-ui-vue3/src/utils/request.js @@ -12,6 +12,8 @@ let downloadLoadingInstance; export let isRelogin = { show: false }; axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' +axios.defaults.headers['X-Tenant-ID'] = '1' +axios.defaults.headers['Request-Method-Name'] = 'login' // 创建axios实例 const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分