@cpzxrobot/sdk 1.1.33 → 1.1.34

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.
@@ -18,5 +18,19 @@ class NewsGateway extends Object {
18
18
  return axios.post("/api/v2/coremde-sale/news/add", args);
19
19
  });
20
20
  }
21
+ get alarm() {
22
+ return {
23
+ add: (args) => {
24
+ return this.context.ready.then(axios => {
25
+ return axios.post("/api/v2/coremde-sale/alarm/add", args);
26
+ });
27
+ },
28
+ list: (args) => {
29
+ return this.context.ready.then(axios => {
30
+ return axios.get("/api/v2/coremde-sale/alarm/list", { params: args });
31
+ });
32
+ }
33
+ };
34
+ }
21
35
  }
22
36
  exports.NewsGateway = NewsGateway;
package/news_gateway.ts CHANGED
@@ -30,4 +30,27 @@ export class NewsGateway extends Object {
30
30
  });
31
31
  }
32
32
 
33
+ get alarm() {
34
+ return {
35
+ add:(args: {
36
+ content: string;
37
+ type: string;
38
+ })=> {
39
+ return this.context.ready.then(axios => {
40
+ return axios.post("/api/v2/coremde-sale/alarm/add", args);
41
+
42
+ });
43
+ },
44
+ list:(args: {
45
+ pageSize?: number;
46
+ pageNo?: number;
47
+ }) =>{
48
+ return this.context.ready.then(axios => {
49
+ return axios.get("/api/v2/coremde-sale/alarm/list", { params: args });
50
+
51
+ });
52
+ }
53
+ }
54
+ }
55
+
33
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.1.33",
3
+ "version": "1.1.34",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/readme.md CHANGED
@@ -199,6 +199,8 @@ baseURL: "/"
199
199
  | cpzxrobot().car.listByCity | 获得车辆在某个市的统计信息,传入city参数 |
200
200
  | cpzxrobot().news.add | 添加新闻 |
201
201
  | cpzxrobot().news.list | 获得新闻列表,传入必要的分页参数 |
202
+ | cpzxrobot().news.alarm.add | 添加报警信息 |
203
+ | cpzxrobot().news.alarm.list | 获得报警列表,传入必要的分页参数 |
202
204
 
203
205
  ### 工厂信息接口
204
206