21 lines
633 B
TypeScript
21 lines
633 B
TypeScript
import { request } from '@/api/request'
|
|
import type { AppDeviceVo, DeviceQueryBody } from './device.types'
|
|
|
|
/** POST /app/device/list — 按家庭/房间查询设备(首页设备 Tab 等) */
|
|
export function fetchDeviceList(query: DeviceQueryBody = {}) {
|
|
return request<AppDeviceVo[]>({
|
|
url: '/app/device/list',
|
|
method: 'POST',
|
|
data: query,
|
|
})
|
|
}
|
|
|
|
/** POST /app/device/listAll — 当前用户绑定的全部设备(选择设备、我的设备等跨家庭场景) */
|
|
export function fetchAllDeviceList() {
|
|
return request<AppDeviceVo[]>({
|
|
url: '/app/device/listAll',
|
|
method: 'GET',
|
|
data: {},
|
|
})
|
|
}
|