@cpzxrobot/sdk 1.2.28 → 1.2.30

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/dist/index.js CHANGED
@@ -177,7 +177,7 @@ class Cpzxrobot {
177
177
  // @ts-ignore
178
178
  this.setProgress = window.miniapp.setProgress;
179
179
  }
180
- else if (domain == "appassets.androidplatform.net" ||
180
+ else if (domain == "appassets.androidplatform.net" || domain == "webc.cpzxrobot.com" ||
181
181
  this.isIosMiniApp(window.location)) {
182
182
  this.mode = "miniapp_in_app";
183
183
  const platform =
@@ -36,6 +36,11 @@ class RobotGateway extends Object {
36
36
  return {
37
37
  list: (taskId) => {
38
38
  return this.context.ready.then(axios => axios.get(`/api/v2/robot/inspectRecord/list/${taskId}`));
39
+ },
40
+ detail: {
41
+ list: (id) => {
42
+ return this.context.ready.then(axios => axios.get(`/api/v2/robot/inspectRecord/detail/list/${id}`));
43
+ }
39
44
  }
40
45
  };
41
46
  }
@@ -58,6 +63,9 @@ class RobotGateway extends Object {
58
63
  },
59
64
  deleteList: (unitId) => {
60
65
  return this.context.ready.then(axios => axios.post(`/api/v2/robot/cage/deleteList/${unitId}`));
66
+ },
67
+ add: (data) => {
68
+ return this.context.ready.then(axios => axios.post('/api/v2/robot/cage/add', data));
61
69
  }
62
70
  };
63
71
  }
@@ -72,8 +80,8 @@ class RobotGateway extends Object {
72
80
  update: (data) => {
73
81
  return this.context.ready.then(axios => axios.post('/api/v2/robot/inspectPath/update', data));
74
82
  },
75
- delete: (data) => {
76
- return this.context.ready.then(axios => axios.post('/api/v2/robot/inspectPath/delete', data));
83
+ delete: (id) => {
84
+ return this.context.ready.then(axios => axios.post(`/api/v2/robot/inspectPath/delete/${id}`));
77
85
  },
78
86
  point: {
79
87
  list: (pathId) => {
@@ -93,6 +101,9 @@ class RobotGateway extends Object {
93
101
  },
94
102
  deleteList: (pathId) => {
95
103
  return this.context.ready.then(axios => axios.post(`/api/v2/robot/inspectPathPoint/deleteList/${pathId}`));
104
+ },
105
+ add: (data) => {
106
+ return this.context.ready.then(axios => axios.post('/api/v2/robot/inspectPathPoint/add', data));
96
107
  }
97
108
  }
98
109
  };
package/index.ts CHANGED
@@ -218,7 +218,7 @@ export class Cpzxrobot {
218
218
  // @ts-ignore
219
219
  this.setProgress = window.miniapp.setProgress;
220
220
  } else if (
221
- domain == "appassets.androidplatform.net" ||
221
+ domain == "appassets.androidplatform.net" || domain == "webc.cpzxrobot.com" ||
222
222
  this.isIosMiniApp(window.location)
223
223
  ) {
224
224
  this.mode = "miniapp_in_app";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.2.28",
3
+ "version": "1.2.30",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/robot_gateway.ts CHANGED
@@ -54,6 +54,13 @@ export class RobotGateway extends Object {
54
54
  return this.context.ready.then(axios =>
55
55
  axios.get(`/api/v2/robot/inspectRecord/list/${taskId}`)
56
56
  );
57
+ },
58
+ detail: {
59
+ list: (id: number) => {
60
+ return this.context.ready.then(axios =>
61
+ axios.get(`/api/v2/robot/inspectRecord/detail/list/${id}`)
62
+ );
63
+ }
57
64
  }
58
65
  };
59
66
  }
@@ -89,6 +96,11 @@ export class RobotGateway extends Object {
89
96
  return this.context.ready.then(axios =>
90
97
  axios.post(`/api/v2/robot/cage/deleteList/${unitId}`)
91
98
  );
99
+ },
100
+ add: (data: any) => {
101
+ return this.context.ready.then(axios =>
102
+ axios.post('/api/v2/robot/cage/add', data)
103
+ );
92
104
  }
93
105
  };
94
106
  }
@@ -110,9 +122,9 @@ export class RobotGateway extends Object {
110
122
  axios.post('/api/v2/robot/inspectPath/update', data)
111
123
  );
112
124
  },
113
- delete: (data: any) => {
125
+ delete: (id: any) => {
114
126
  return this.context.ready.then(axios =>
115
- axios.post('/api/v2/robot/inspectPath/delete', data)
127
+ axios.post(`/api/v2/robot/inspectPath/delete/${id}`)
116
128
  );
117
129
  },
118
130
  point: {
@@ -145,6 +157,11 @@ export class RobotGateway extends Object {
145
157
  return this.context.ready.then(axios =>
146
158
  axios.post(`/api/v2/robot/inspectPathPoint/deleteList/${pathId}`)
147
159
  );
160
+ },
161
+ add: (data: any) => {
162
+ return this.context.ready.then(axios =>
163
+ axios.post('/api/v2/robot/inspectPathPoint/add', data)
164
+ );
148
165
  }
149
166
  }
150
167
  };