@cpzxrobot/sdk 1.3.44 → 1.3.45
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 +4 -0
- package/dist/device_gateway.js +4 -0
- package/package.json +1 -1
package/device_gateway.ts
CHANGED
|
@@ -985,6 +985,10 @@ export class DeviceGateway extends Object {
|
|
|
985
985
|
var axios = await this.context.ready;
|
|
986
986
|
return axios.post(`/api/v2/disinfect/${deviceId}`, { door, open })
|
|
987
987
|
},
|
|
988
|
+
start: async (deviceId: number) => {
|
|
989
|
+
var axios = await this.context.ready;
|
|
990
|
+
return axios.post(`/api/v2/disinfect/${deviceId}`, { end:true })
|
|
991
|
+
},
|
|
988
992
|
config: async (deviceId: number, config: {
|
|
989
993
|
mode?: number; // 0:没有消毒 1:高温消毒 2:臭氧消毒 3:高温+臭氧
|
|
990
994
|
disinfectTime?: number; // 洗消时间(s)
|
package/dist/device_gateway.js
CHANGED
|
@@ -753,6 +753,10 @@ class DeviceGateway extends Object {
|
|
|
753
753
|
var axios = await this.context.ready;
|
|
754
754
|
return axios.post(`/api/v2/disinfect/${deviceId}`, { door, open });
|
|
755
755
|
},
|
|
756
|
+
start: async (deviceId) => {
|
|
757
|
+
var axios = await this.context.ready;
|
|
758
|
+
return axios.post(`/api/v2/disinfect/${deviceId}`, { end: true });
|
|
759
|
+
},
|
|
756
760
|
config: async (deviceId, config) => {
|
|
757
761
|
let axios = await this.context.ready;
|
|
758
762
|
return axios.post(`/api/v2/disinfect/${deviceId}`, config).then((res) => {
|