@cpzxrobot/sdk 1.3.10 → 1.3.12

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.
@@ -280,6 +280,18 @@ class ProjectGateway extends Object {
280
280
  return this.context.ready.then((axios) => {
281
281
  return axios.get(`/api/v2/coremde-sale/project/stage/details?projectId=${projectId}`);
282
282
  });
283
+ },
284
+ // 根据项目ID获取阶段模板
285
+ type: (projectId) => {
286
+ return this.context.ready.then((axios) => {
287
+ return axios.get(`/api/v2/coremde-sale/project/stage/type/${projectId}`);
288
+ });
289
+ },
290
+ // 批量保存项目阶段
291
+ batchAdd: (stages) => {
292
+ return this.context.ready.then((axios) => {
293
+ return axios.post(`/api/v2/coremde-sale/project/stage/batchAdd`, stages);
294
+ });
283
295
  }
284
296
  };
285
297
  }
@@ -95,6 +95,12 @@ class UserGateway extends Object {
95
95
  title: "请选择上传头像文件"
96
96
  });
97
97
  }
98
+ async sign(id) {
99
+ var axios = await this.context.ready;
100
+ return axios.upload(`/api/v2/user/${id}/sign/add`, {
101
+ title: "请选择上传电子签名文件"
102
+ });
103
+ }
98
104
  get approval() {
99
105
  return {
100
106
  count: (id, status) => {
@@ -17,7 +17,7 @@ export class MobilePlatform implements PlatformInterface {
17
17
 
18
18
  window.addEventListener('message', (event) => {
19
19
  if (event.data == 'capturePort') {
20
- this.port = event.ports[0];
20
+ this.port = event.ports[0];
21
21
  if (this.port != null) {
22
22
  this.port.onmessage = (event: MessageEvent) => {
23
23
  if (event.data.id != undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.3.10",
3
+ "version": "1.3.12",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -357,6 +357,18 @@ export class ProjectGateway extends Object {
357
357
  return this.context.ready.then((axios) => {
358
358
  return axios.get(`/api/v2/coremde-sale/project/stage/details?projectId=${projectId}`);
359
359
  });
360
+ },
361
+ // 根据项目ID获取阶段模板
362
+ type: (projectId: number) => {
363
+ return this.context.ready.then((axios) => {
364
+ return axios.get(`/api/v2/coremde-sale/project/stage/type/${projectId}`);
365
+ });
366
+ },
367
+ // 批量保存项目阶段
368
+ batchAdd: (stages: any[]) => {
369
+ return this.context.ready.then((axios) => {
370
+ return axios.post(`/api/v2/coremde-sale/project/stage/batchAdd`, stages);
371
+ });
360
372
  }
361
373
  }
362
374
  }
package/user_gateway.ts CHANGED
@@ -119,6 +119,13 @@ export class UserGateway extends Object {
119
119
  });
120
120
  }
121
121
 
122
+ async sign(id: number) {
123
+ var axios = await this.context.ready;
124
+ return axios.upload(`/api/v2/user/${id}/sign/add`, {
125
+ title: "请选择上传电子签名文件"
126
+ });
127
+ }
128
+
122
129
  get approval() {
123
130
  return {
124
131
  count: (id: number, status: any) => {