|
|
@@ -96,7 +96,7 @@ const transform: AxiosTransform = {
|
|
|
// http开头的请求url,不加前缀
|
|
|
let isStartWithHttp = false;
|
|
|
const requestUrl = config.url;
|
|
|
- if(requestUrl!=null && (requestUrl.startsWith("http:") || requestUrl.startsWith("https:"))){
|
|
|
+ if (requestUrl != null && (requestUrl.startsWith("http:") || requestUrl.startsWith("https:"))) {
|
|
|
isStartWithHttp = true;
|
|
|
}
|
|
|
if (!isStartWithHttp && joinPrefix) {
|
|
|
@@ -107,7 +107,7 @@ const transform: AxiosTransform = {
|
|
|
config.url = `${apiUrl}${config.url}`;
|
|
|
}
|
|
|
//update-end---author:scott ---date::2024-02-20 for:以http开头的请求url,不拼加前缀--
|
|
|
-
|
|
|
+
|
|
|
const params = config.params || {};
|
|
|
const data = config.data || false;
|
|
|
formatDate && data && !isString(data) && formatRequestDate(data);
|
|
|
@@ -159,7 +159,7 @@ const transform: AxiosTransform = {
|
|
|
// 请求之前处理config
|
|
|
const token = getToken();
|
|
|
let tenantId: string | number = getTenantId();
|
|
|
-
|
|
|
+
|
|
|
//update-begin---author:wangshuai---date:2024-04-16---for:【QQYUN-9005】发送短信加签。解决没有token无法加签---
|
|
|
// 将签名和时间戳,添加在请求接口 Header
|
|
|
config.headers[ConfigEnum.TIMESTAMP] = signMd5Utils.getTimestamp();
|
|
|
@@ -176,7 +176,7 @@ const transform: AxiosTransform = {
|
|
|
// jwt token
|
|
|
config.headers.Authorization = options.authenticationScheme ? `${options.authenticationScheme} ${token}` : token;
|
|
|
config.headers[ConfigEnum.TOKEN] = token;
|
|
|
-
|
|
|
+
|
|
|
// 将签名和时间戳,添加在请求接口 Header
|
|
|
//config.headers[ConfigEnum.TIMESTAMP] = signMd5Utils.getTimestamp();
|
|
|
//config.headers[ConfigEnum.Sign] = signMd5Utils.getSign(config.url, config.params);
|
|
|
@@ -209,7 +209,8 @@ const transform: AxiosTransform = {
|
|
|
}
|
|
|
// update-end--author:sunjianlei---date:20220624--for: 添加低代码应用ID
|
|
|
// ========================================================================================
|
|
|
-
|
|
|
+ // 添加AppType参数,值为11(仅在用户登录后添加)
|
|
|
+ config.headers['AppType'] = '11';
|
|
|
}
|
|
|
return config;
|
|
|
},
|