Showing
1 changed file
with
6 additions
and
3 deletions
@@ -12,6 +12,7 @@ import { | @@ -12,6 +12,7 @@ import { | ||
12 | import { ChildDeviceParams } from './model/deviceModel'; | 12 | import { ChildDeviceParams } from './model/deviceModel'; |
13 | import { PaginationResult } from '/#/axios'; | 13 | import { PaginationResult } from '/#/axios'; |
14 | import { AlarmLogItem } from './model/deviceConfigModel'; | 14 | import { AlarmLogItem } from './model/deviceConfigModel'; |
15 | +import { omit } from 'lodash-es'; | ||
15 | enum DeviceManagerApi { | 16 | enum DeviceManagerApi { |
16 | /** | 17 | /** |
17 | * 设备URL | 18 | * 设备URL |
@@ -38,9 +39,11 @@ enum DeviceManagerApi { | @@ -38,9 +39,11 @@ enum DeviceManagerApi { | ||
38 | } | 39 | } |
39 | 40 | ||
40 | export const devicePage = (params: DeviceQueryParam) => { | 41 | export const devicePage = (params: DeviceQueryParam) => { |
41 | - return defHttp.get<PaginationResult<DeviceModel>>({ | ||
42 | - url: DeviceManagerApi.DEVICE_URL, | ||
43 | - params, | 42 | + const { page, pageSize } = params; |
43 | + const otherParams = omit(params, ['page', 'pageSize']); | ||
44 | + return defHttp.post<PaginationResult<DeviceModel>>({ | ||
45 | + url: `${DeviceManagerApi.DEVICE_URL}?page=${page}&pageSize=${pageSize}`, | ||
46 | + params: otherParams, | ||
44 | }); | 47 | }); |
45 | }; | 48 | }; |
46 | 49 |