riku
2024-10-30 d4e7c11e06b643c9353444c839cec40c25945219
src/api/fysp/deviceApi.js
@@ -13,11 +13,17 @@
  // 获取设备
  async fetchDevices(sceneId, deviceTypeId) {
    const params = `?sceneId=${sceneId}&deviceTypeId=${deviceTypeId}`;
    return await $fysp.get(`device${params}`).then((res) => res).then((res) => res.data);
    return await $fysp
      .get(`device${params}`)
      .then((res) => res)
      .then((res) => res.data);
  },
  // 获取设备状态以及设备详情
  async fetchDeviceStatus({deviceId, sceneId, deviceTypeId}) {
  async fetchDeviceStatus({ deviceId, sceneId, deviceTypeId }) {
    const params = `?deviceId=${deviceId}&sceneId=${sceneId}&deviceTypeId=${deviceTypeId}`;
    return await $fysp.get(`device/status${params}`).then((res) => res).then((res) => res.data);
    return await $fysp
      .get(`device/status${params}`)
      .then((res) => res)
      .then((res) => res.data);
  }
};