@cpzxrobot/sdk 1.1.23 → 1.1.25

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.
@@ -269,9 +269,9 @@ class PigfarmGateway extends Object {
269
269
  action,
270
270
  });
271
271
  },
272
- taskStatus: async (no) => {
272
+ taskStatus: async (args) => {
273
273
  var axios = await this.context.ready;
274
- return axios.post(`/api/v1/pigfarm/heatLamp/task/${no}`);
274
+ return axios.post(`/api/v1/pigfarm/heatLamp/task`, args);
275
275
  },
276
276
  control: async (lamp, action) => {
277
277
  var axios = await this.context.ready;
@@ -26,12 +26,10 @@ class ProjectGateway extends Object {
26
26
  });
27
27
  });
28
28
  },
29
- //date 传入格式为2019-8或者Date类型对象
30
- list: (projectId) => {
29
+ // 获取反馈列表
30
+ list: (args) => {
31
31
  return this.context.ready.then((axios) => {
32
- return axios.post(`/api/v2/coremde-sale/project/feedback/list`, {
33
- projectId,
34
- });
32
+ return axios.post(`/api/v2/coremde-sale/project/feedback/list`, args);
35
33
  });
36
34
  }
37
35
  };
@@ -168,7 +168,7 @@ class UserGateway extends Object {
168
168
  }
169
169
  };
170
170
  }
171
- searchHistory() {
171
+ get searchHistory() {
172
172
  return {
173
173
  list: (type) => {
174
174
  return this.context.ready.then((axios) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.1.23",
3
+ "version": "1.1.25",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -328,9 +328,13 @@ export class PigfarmGateway extends Object {
328
328
  action,
329
329
  });
330
330
  },
331
- taskStatus: async (no: String): Promise<any> => {
331
+ taskStatus: async (args:{
332
+ id?:number,
333
+ unitId?:number,
334
+ type?: string
335
+ }): Promise<any> => {
332
336
  var axios = await this.context.ready;
333
- return axios.post(`/api/v1/pigfarm/heatLamp/task/${no}`);
337
+ return axios.post(`/api/v1/pigfarm/heatLamp/task`,args);
334
338
  },
335
339
  control: async (lamp: HeatLamp | number, action: "on" | "off") => {
336
340
  var axios = await this.context.ready;
@@ -36,12 +36,14 @@ export class ProjectGateway extends Object {
36
36
  });
37
37
  });
38
38
  },
39
- //date 传入格式为2019-8或者Date类型对象
40
- list: (projectId: number) => {
39
+ // 获取反馈列表
40
+ list: (args: {
41
+ pageNo: number;
42
+ pageSize: number;
43
+ projectId: number;
44
+ }) => {
41
45
  return this.context.ready.then((axios) => {
42
- return axios.post(`/api/v2/coremde-sale/project/feedback/list`, {
43
- projectId,
44
- });
46
+ return axios.post(`/api/v2/coremde-sale/project/feedback/list`, args);
45
47
  });
46
48
  }
47
49
  };
package/readme.md CHANGED
@@ -125,7 +125,7 @@ baseURL: "/"
125
125
  | cpzxrobot().pigfarm.heatlamp.iotFields | 获取保温灯用于获取iot的字段列表 |
126
126
  | cpzxrobot().pigfarm.heatlamp.switchByUnit | 按单元id开关,返回task |
127
127
  | cpzxrobot().pigfarm.heatlamp.updateByUnit | 按单元id设置保温灯的参数,返回task |
128
- | cpzxrobot().pigfarm.heatlamp.taskStatus | 获取保温灯的任务状态,传入taskId参数 |
128
+ | cpzxrobot().pigfarm.heatlamp.taskStatus | 获取保温灯的任务状态,传入taskId参数或者unitId和type自动查询 |
129
129
  | cpzxrobot().pigfarm.heatlamp.template.add | 添加保温灯的模板 |
130
130
  | cpzxrobot().pigfarm.heatlamp.template.list | 获取保温灯的模板列表 |
131
131
  | cpzxrobot().pigfarm.threshold | 获取单元中特定类型的阈值信息 |
@@ -147,8 +147,8 @@ baseURL: "/"
147
147
  | cpzxrobot().user.approval.count | 获取用户审批列表的数量,传入userId和status参数 |
148
148
  | cpzxrobot().user.checkin.add | 添加用户签到记录,传入userId和address参数 |
149
149
  | cpzxrobot().user.checkin.list | 列出用户签到记录,传入userId和date参数 |
150
- | cpzxrobot().user.searchHistoy.list | 列出用户搜索历史记录,传入type参数 |
151
- | cpzxrobot().user.searchHistoy.add | 添加用户搜索历史记录,传入type参数和搜索内容 |
150
+ | cpzxrobot().user.searchHistory.list | 列出用户搜索历史记录,传入type参数 |
151
+ | cpzxrobot().user.searchHistory.add | 添加用户搜索历史记录,传入type参数和搜索内容 |
152
152
  | cpzxrobot().product.list | 获得产品列表,传入factory_id和必要的分页参数 |
153
153
  | cpzxrobot().product.get | 获得产品信息,传入id参数 |
154
154
  | cpzxrobot().project.list | 获得项目列表,传入factory_id和必要的分页参数 |
package/user_gateway.ts CHANGED
@@ -182,7 +182,7 @@ export class UserGateway extends Object {
182
182
  };
183
183
  }
184
184
 
185
- searchHistory() {
185
+ get searchHistory() {
186
186
  return {
187
187
  list: (type:number) => {
188
188
  return this.context.ready.then((axios) => {