mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-22 06:39:37 +08:00
92 lines
1.9 KiB
JavaScript
92 lines
1.9 KiB
JavaScript
import {
|
|
request
|
|
} from '../selfRequest';
|
|
|
|
|
|
// 根据用户id查询对应的设备
|
|
export function getEquipmentByUserIdRq(id) {
|
|
return request({
|
|
url: '/api/equipment/getEquipmentByUserId/' + id,
|
|
method: "get",
|
|
});
|
|
}
|
|
|
|
// 开门
|
|
export function openDoorRq(data) {
|
|
return request({
|
|
url: '/api/equipment/openDoor',
|
|
method: "post",
|
|
data
|
|
});
|
|
}
|
|
|
|
// 开门记录
|
|
export function getOpenDoorRecordRq(data) {
|
|
return request({
|
|
url: `/api/equipment/getOpenDoorRecord?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
|
|
method: "post",
|
|
data
|
|
});
|
|
}
|
|
|
|
|
|
|
|
// 获取所有房间
|
|
export function getAllRoomInfoRq() {
|
|
return request({
|
|
url: `/api/wisdom/getAllRoomInfo`,
|
|
method: "post",
|
|
});
|
|
}
|
|
|
|
// 根据房间获取对应设备列表
|
|
export function getAllDeviceInfoByRoomIdRq(id) {
|
|
return request({
|
|
url: `/api/wisdom/getAllDeviceInfoByRoomId?id=${id}`,
|
|
method: "get",
|
|
});
|
|
}
|
|
|
|
|
|
// 根据房间获取对应情景列表
|
|
export function getAllPanelInfoByRoomIdRq(id) {
|
|
return request({
|
|
url: `/api/wisdom/getAllPanelInfoByRoomId?id=${id}`,
|
|
method: "get",
|
|
});
|
|
}
|
|
|
|
// 根据情景面板id 调用
|
|
export function callApiByPanelIdRq(data) {
|
|
return request({
|
|
url: `/api/wisdom/callApiByPanelId`,
|
|
method: "post",
|
|
data
|
|
});
|
|
}
|
|
|
|
|
|
// 根据设备id调用对接接口
|
|
//{
|
|
// "deviceId": 15,
|
|
// "actionArg": true,
|
|
// "bir": 74,
|
|
// "colourTemperature": 31,
|
|
// "coverType": "test_1f24337e3bf8"
|
|
// }
|
|
export function callApiByDeviceIdRq(data) {
|
|
return request({
|
|
url: `/api/wisdom/callApiByDeviceId`,
|
|
method: "post",
|
|
data
|
|
});
|
|
}
|
|
|
|
// 查询设备详情
|
|
export function getDeviceInfoRq(id) {
|
|
return request({
|
|
url: `/api/wisdom/getDeviceInfo?id=${id}`,
|
|
method: "get",
|
|
});
|
|
}
|