Commit ba8e5e52ce87ac76e2f3484cc8604750c349838e
1 parent
609935c6
fix: DEFECT-947 click device location page happend error
Showing
1 changed file
with
2 additions
and
1 deletions
| 1 | import { DeviceProfileModel } from '../../device/model/deviceModel'; | 1 | import { DeviceProfileModel } from '../../device/model/deviceModel'; |
| 2 | import { HistoryData } from './model'; | 2 | import { HistoryData } from './model'; |
| 3 | import { defHttp } from '/@/utils/http/axios'; | 3 | import { defHttp } from '/@/utils/http/axios'; |
| 4 | +import { isString } from '/@/utils/is'; | ||
| 4 | 5 | ||
| 5 | // 获取设备配置 | 6 | // 获取设备配置 |
| 6 | export const getDeviceProfile = (deviceType?: string) => { | 7 | export const getDeviceProfile = (deviceType?: string) => { |
| 7 | return defHttp.get<DeviceProfileModel[]>({ | 8 | return defHttp.get<DeviceProfileModel[]>({ |
| 8 | url: '/device_profile/me/list', | 9 | url: '/device_profile/me/list', |
| 9 | - params: { deviceType }, | 10 | + params: { deviceType: isString(deviceType) ? deviceType : undefined }, |
| 10 | }); | 11 | }); |
| 11 | }; | 12 | }; |
| 12 | 13 |