@cpzxrobot/sdk 1.0.12 → 1.0.13

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_filter.ts CHANGED
@@ -309,11 +309,8 @@ export abstract class DeviceFilter<T extends { id: number }> {
309
309
  if (res.data.Error) {
310
310
  throw res.data.Error;
311
311
  } else {
312
- if (options == undefined || options.id == undefined) {
313
- //当id为空时(获取用户选中工厂的设备),将所有设备保存到devices中
314
- this.devices = res.data;
315
- }
316
- return res.data;
312
+ return this.wrapList(res.data);
313
+ // return res.data;
317
314
  }
318
315
  });
319
316
  }
@@ -241,11 +241,8 @@ class DeviceFilter {
241
241
  throw res.data.Error;
242
242
  }
243
243
  else {
244
- if (options == undefined || options.id == undefined) {
245
- //当id为空时(获取用户选中工厂的设备),将所有设备保存到devices中
246
- this.devices = res.data;
247
- }
248
- return res.data;
244
+ return this.wrapList(res.data);
245
+ // return res.data;
249
246
  }
250
247
  });
251
248
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {