@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 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/device/disinfect/${deviceId}`, { door, open })
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/device/disinfect/${deviceId}`, config).then((res) => {
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/device/disinfect/${deviceId}`, { params: { pageNum, pageSize } }).then((res) => {
1001
+ return axios.get(`/api/v2/disinfect/${deviceId}`, { params: { pageNum, pageSize } }).then((res) => {
1002
1002
  return res.data;
1003
1003
  });
1004
1004
  }
@@ -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/device/disinfect/${deviceId}`, { door, open });
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/device/disinfect/${deviceId}`, config).then((res) => {
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/device/disinfect/${deviceId}`, { params: { pageNum, pageSize } }).then((res) => {
764
+ return axios.get(`/api/v2/disinfect/${deviceId}`, { params: { pageNum, pageSize } }).then((res) => {
765
765
  return res.data;
766
766
  });
767
767
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.3.43",
3
+ "version": "1.3.44",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {