@kengic/uni 0.6.3-beta.14 → 0.6.3-beta.15
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.
|
@@ -3,6 +3,7 @@ import { Kg } from '../util';
|
|
|
3
3
|
import { KG_DYNAMIC_QUERY_OPERATOR, KG_HTTP_HEADERS } from '../const';
|
|
4
4
|
import { useKgWarehouse } from '../component/KgWarehouse/index.hooks';
|
|
5
5
|
import { useKgStation } from '../component/KgStation';
|
|
6
|
+
import { isNil } from 'lodash-es';
|
|
6
7
|
|
|
7
8
|
/*
|
|
8
9
|
* 对请求做统一的拦截.
|
|
@@ -179,7 +180,8 @@ const _httpClient: IHttpClient = {
|
|
|
179
180
|
if (['POST', 'PUT', 'DELETE'].includes(method) && params) {
|
|
180
181
|
try {
|
|
181
182
|
const queryString = Object.keys(params)
|
|
182
|
-
//
|
|
183
|
+
// 值为 null/undefined 的参数, 不需要放到 query 参数中去,
|
|
184
|
+
.filter((i) => !isNil(params[i]))
|
|
183
185
|
.map((i) => i + '=' + params[i])
|
|
184
186
|
.join('&');
|
|
185
187
|
if (queryString) {
|