@lark-apaas/client-toolkit 1.1.16-alpha.proxy.8 → 1.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/override.css +5 -0
- package/lib/utils/axiosConfig.js +13 -0
- package/package.json +1 -1
package/lib/override.css
CHANGED
package/lib/utils/axiosConfig.js
CHANGED
|
@@ -15,9 +15,22 @@ async function logResponse(ok, response) {
|
|
|
15
15
|
'ms'
|
|
16
16
|
];
|
|
17
17
|
const logTraceID = response.headers['x-log-trace-id'];
|
|
18
|
+
const queryParams = {};
|
|
19
|
+
const url = response.config.url || '';
|
|
20
|
+
const queryString = url.split('?')[1];
|
|
21
|
+
if (queryString) {
|
|
22
|
+
const urlParams = new URLSearchParams(queryString);
|
|
23
|
+
urlParams.forEach((value, key)=>{
|
|
24
|
+
queryParams[key] = value;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
if (response.config.params) Object.assign(queryParams, response.config.params);
|
|
18
28
|
const args = [
|
|
19
29
|
{
|
|
20
30
|
'请求参数:': response.config.data,
|
|
31
|
+
...Object.keys(queryParams).length > 0 && {
|
|
32
|
+
'查询参数:': queryParams
|
|
33
|
+
},
|
|
21
34
|
'返回数据:': response.data,
|
|
22
35
|
'请求摘要:': {
|
|
23
36
|
TraceID: logTraceID,
|