@cpzxrobot/sdk 1.0.57 → 1.0.58

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.
@@ -86,7 +86,7 @@ class PigfarmGateway extends Object {
86
86
  //获取仪表列表,
87
87
  list: (factory) => {
88
88
  return this.context.ready.then((axios) => {
89
- return axios.get(`/api/v2/pigfarm/relay/weightMeter/list/${factory.id}`);
89
+ return axios.get(`/api/v2/pigfarm/weightMeter/list/${factory.id}`);
90
90
  });
91
91
  },
92
92
  //获取仪表下的所有传感器,这里获得的都是已绑定的
@@ -97,13 +97,19 @@ class PigfarmGateway extends Object {
97
97
  },
98
98
  add: (data) => {
99
99
  return this.context.ready.then((axios) => {
100
- return axios.post(`/api/v2/pigfarm/relay/weightMeter/add`, data);
100
+ return axios.post(`/api/v2/pigfarm/weightMeter/add`, data);
101
+ });
102
+ },
103
+ //按料塔获取仪表信息
104
+ getByFt: (deviceId) => {
105
+ return this.context.ready.then((axios) => {
106
+ return axios.get(`/api/v2/pigfarm/weightMeterSensor/config/by-ft/${deviceId}`);
101
107
  });
102
108
  },
103
109
  //更新仪表信息
104
110
  update: (data) => {
105
111
  return this.context.ready.then((axios) => {
106
- return axios.post(`/api/v2/pigfarm/relay/weightMeter/update`, data);
112
+ return axios.post(`/api/v2/pigfarm/weightMeter/update`, data);
107
113
  });
108
114
  },
109
115
  updateSensor: (data) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.0.57",
3
+ "version": "1.0.58",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -106,7 +106,7 @@ export class PigfarmGateway extends Object {
106
106
  list: (factory: Factory) => {
107
107
  return this.context.ready.then((axios) => {
108
108
  return axios.get(
109
- `/api/v2/pigfarm/relay/weightMeter/list/${factory.id}`
109
+ `/api/v2/pigfarm/weightMeter/list/${factory.id}`
110
110
  );
111
111
  });
112
112
  },
@@ -120,13 +120,21 @@ export class PigfarmGateway extends Object {
120
120
  },
121
121
  add: (data: WeightMeter) => {
122
122
  return this.context.ready.then((axios) => {
123
- return axios.post(`/api/v2/pigfarm/relay/weightMeter/add`, data);
123
+ return axios.post(`/api/v2/pigfarm/weightMeter/add`, data);
124
+ });
125
+ },
126
+ //按料塔获取仪表信息
127
+ getByFt: (deviceId: number) => {
128
+ return this.context.ready.then((axios) => {
129
+ return axios.get(
130
+ `/api/v2/pigfarm/weightMeterSensor/config/by-ft/${deviceId}`
131
+ );
124
132
  });
125
133
  },
126
134
  //更新仪表信息
127
135
  update: (data: any) => {
128
136
  return this.context.ready.then((axios) => {
129
- return axios.post(`/api/v2/pigfarm/relay/weightMeter/update`, data);
137
+ return axios.post(`/api/v2/pigfarm/weightMeter/update`, data);
130
138
  });
131
139
  },
132
140
  updateSensor: (data: any) => {