@cpzxrobot/sdk 1.0.20 → 1.0.21

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.
@@ -9,7 +9,7 @@ class PigfarmGateway extends Object {
9
9
  //获得日龄
10
10
  dayageForUnit(unit) {
11
11
  return this.context.ready.then((axios) => {
12
- return axios.get(`/api/v1/pigfarm/${unit.id}/dayage`);
12
+ return axios.get(`/api/v1/pigfarm/dayage/${unit.id}`);
13
13
  });
14
14
  }
15
15
  //获得存栏量
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -9,7 +9,7 @@ export class PigfarmGateway extends Object {
9
9
  //获得日龄
10
10
  dayageForUnit(unit: Unit) {
11
11
  return this.context.ready.then((axios) => {
12
- return axios.get(`/api/v1/pigfarm/${unit.id}/dayage`);
12
+ return axios.get(`/api/v1/pigfarm/dayage/${unit.id}`);
13
13
  });
14
14
  }
15
15
 
package/readme.md CHANGED
@@ -74,8 +74,8 @@ baseURL: "/"
74
74
  | 调用入口 | 功能说明 |
75
75
  | ----------------------- | -------------------- |
76
76
  | cpzxrobot().factory.xxx | 获得工厂的相关信息 |
77
- | cpzxrobot().device.list | 获得常见设备的列表(当没有特殊类型需求时调用) |
78
- | cpzxrobot().device.data | 获得设备的数据 |
77
+ | cpzxrobot().device.list | 获得常见设备的列表(当没有特殊类型需求时调用),列表接口提供data参数,可以同步获得多个设备的数据,尽量使用该接口获得设备数据 |
78
+ | cpzxrobot().device.data | 获得设备的数据,该接口用于获取单个设备的详细数据 |
79
79
  | cpzxrobot().device.feedTower.list | 获得料塔设备的列表 |
80
80
  | cpzxrobot().device.xxx | 获得设备的相关信息 |
81
81
  | cpzxrobot().camera.xxx | 获得摄像头的相关信息 |