@cpzxrobot/sdk 1.3.43 → 1.3.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/device_gateway.ts +3 -3
- package/dist/device_gateway.js +3 -3
- package/package.json +1 -1
package/device_gateway.ts
CHANGED
|
@@ -983,7 +983,7 @@ export class DeviceGateway extends Object {
|
|
|
983
983
|
return {
|
|
984
984
|
openDoor: async (deviceId: number,door: "doora" | "doorb", open: boolean) => {
|
|
985
985
|
var axios = await this.context.ready;
|
|
986
|
-
return axios.post(`/api/v2/
|
|
986
|
+
return axios.post(`/api/v2/disinfect/${deviceId}`, { door, open })
|
|
987
987
|
},
|
|
988
988
|
config: async (deviceId: number, config: {
|
|
989
989
|
mode?: number; // 0:没有消毒 1:高温消毒 2:臭氧消毒 3:高温+臭氧
|
|
@@ -992,13 +992,13 @@ export class DeviceGateway extends Object {
|
|
|
992
992
|
targetOzone?: number; // 目标臭氧浓度
|
|
993
993
|
}) => {
|
|
994
994
|
let axios = await this.context.ready;
|
|
995
|
-
return axios.post(`/api/v2/
|
|
995
|
+
return axios.post(`/api/v2/disinfect/${deviceId}`, config).then((res) => {
|
|
996
996
|
return res.data;
|
|
997
997
|
});
|
|
998
998
|
},
|
|
999
999
|
history: async (deviceId: number, pageNum:number,pageSize:number) => {
|
|
1000
1000
|
let axios = await this.context.ready;
|
|
1001
|
-
return axios.get(`/api/v2/
|
|
1001
|
+
return axios.get(`/api/v2/disinfect/${deviceId}`, { params: { pageNum, pageSize } }).then((res) => {
|
|
1002
1002
|
return res.data;
|
|
1003
1003
|
});
|
|
1004
1004
|
}
|
package/dist/device_gateway.js
CHANGED
|
@@ -751,17 +751,17 @@ class DeviceGateway extends Object {
|
|
|
751
751
|
return {
|
|
752
752
|
openDoor: async (deviceId, door, open) => {
|
|
753
753
|
var axios = await this.context.ready;
|
|
754
|
-
return axios.post(`/api/v2/
|
|
754
|
+
return axios.post(`/api/v2/disinfect/${deviceId}`, { door, open });
|
|
755
755
|
},
|
|
756
756
|
config: async (deviceId, config) => {
|
|
757
757
|
let axios = await this.context.ready;
|
|
758
|
-
return axios.post(`/api/v2/
|
|
758
|
+
return axios.post(`/api/v2/disinfect/${deviceId}`, config).then((res) => {
|
|
759
759
|
return res.data;
|
|
760
760
|
});
|
|
761
761
|
},
|
|
762
762
|
history: async (deviceId, pageNum, pageSize) => {
|
|
763
763
|
let axios = await this.context.ready;
|
|
764
|
-
return axios.get(`/api/v2/
|
|
764
|
+
return axios.get(`/api/v2/disinfect/${deviceId}`, { params: { pageNum, pageSize } }).then((res) => {
|
|
765
765
|
return res.data;
|
|
766
766
|
});
|
|
767
767
|
}
|