From cca8d423c4805665bbd48a47e4d9218b16d14ebb Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 28 三月 2025 17:42:35 +0800 Subject: [PATCH] 新增自动评估监测数据上传功能(待完成) --- src/api/fysp/deviceApi.js | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/api/fysp/deviceApi.js b/src/api/fysp/deviceApi.js index 8dc9dd1..f95c919 100644 --- a/src/api/fysp/deviceApi.js +++ b/src/api/fysp/deviceApi.js @@ -11,13 +11,19 @@ .then((res) => res.data); }, // 鑾峰彇璁惧 - async fetchDevices(sceneId, deviceTypeId) { + fetchDevices(sceneId, deviceTypeId) { const params = `?sceneId=${sceneId}&deviceTypeId=${deviceTypeId}`; - return await $fysp.get(`device${params}`).then((res) => res).then((res) => res.data); + return $fysp + .get(`device${params}`) + .then((res) => res) + .then((res) => res.data); }, // 鑾峰彇璁惧鐘舵�佷互鍙婅澶囪鎯� - async fetchDeviceStatus({deviceId, sceneId, deviceTypeId}) { + 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 $fysp + .get(`device/status${params}`) + .then((res) => res) + .then((res) => res.data); } }; -- Gitblit v1.9.3