@cpzxrobot/sdk 1.1.56 → 1.1.57

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.
@@ -75,6 +75,15 @@ class ProjectGateway extends Object {
75
75
  return axios.post(`/api/v2/coremde-sale/project/document/list`, args);
76
76
  });
77
77
  },
78
+ export: (id, fileName = "项目文档.pdf") => {
79
+ return this.context.ready.then((axios) => {
80
+ return axios.getAndSave(`/api/v2/coremde-sale/project/document/export`, {
81
+ params: {
82
+ id,
83
+ }
84
+ }, fileName);
85
+ });
86
+ }
78
87
  };
79
88
  }
80
89
  get material() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.1.56",
3
+ "version": "1.1.57",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -106,6 +106,15 @@ export class ProjectGateway extends Object {
106
106
  return axios.post(`/api/v2/coremde-sale/project/document/list`, args);
107
107
  });
108
108
  },
109
+ export: (id: number, fileName: string = "项目文档.pdf") => {
110
+ return this.context.ready.then((axios) => {
111
+ return axios.getAndSave(`/api/v2/coremde-sale/project/document/export`, {
112
+ params: {
113
+ id,
114
+ }
115
+ },fileName);
116
+ });
117
+ }
109
118
  };
110
119
  }
111
120