@cpzxrobot/sdk 1.1.26 → 1.1.27

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.
@@ -259,9 +259,9 @@ class PigfarmGateway extends Object {
259
259
  var axios = await this.context.ready;
260
260
  return axios.post(`/api/v1/pigfarm/heatLamp/config/update`, lamp);
261
261
  },
262
- updateByUnit: async (unit, lamp) => {
262
+ updateByUnit: async (unit, lamp, ids = null) => {
263
263
  var axios = await this.context.ready;
264
- return axios.post(`/api/v1/pigfarm/heatLamp/config/${unit.id}/update`, lamp);
264
+ return axios.post(`/api/v1/pigfarm/heatLamp/config/${unit.id}/update`, Object.assign(Object.assign({}, lamp), { ids }));
265
265
  },
266
266
  switchByUnit: async (unit, action, ids = null) => {
267
267
  var axios = await this.context.ready;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -318,9 +318,12 @@ export class PigfarmGateway extends Object {
318
318
  var axios = await this.context.ready;
319
319
  return axios.post(`/api/v1/pigfarm/heatLamp/config/update`, lamp);
320
320
  },
321
- updateByUnit: async (unit: Unit,lamp: HeatLamp): Promise<any> => {
321
+ updateByUnit: async (unit: Unit,lamp: HeatLamp,ids:Number[]|null = null): Promise<any> => {
322
322
  var axios = await this.context.ready;
323
- return axios.post(`/api/v1/pigfarm/heatLamp/config/${unit.id}/update`, lamp);
323
+ return axios.post(`/api/v1/pigfarm/heatLamp/config/${unit.id}/update`, {
324
+ ...lamp,
325
+ ids
326
+ });
324
327
  },
325
328
  switchByUnit: async (unit: Unit, action: "on" | "off",ids:Number[]|null = null): Promise<any> => {
326
329
  var axios = await this.context.ready;