@cpzxrobot/sdk 1.1.74 → 1.1.76

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.
@@ -150,6 +150,7 @@ class ProjectGateway extends Object {
150
150
  return axios.getAndSave(`/api/v2/coremde-sale/project/inquiry/export`, {
151
151
  params: {
152
152
  id,
153
+ fileName
153
154
  }
154
155
  }, fileName);
155
156
  });
@@ -131,9 +131,11 @@ class UserGateway extends Object {
131
131
  var axios = await this.context.ready;
132
132
  return axios.post("/api/v2/user/delete?id=" + id);
133
133
  }
134
- async avatar(id, avatar) {
134
+ async avatar(id) {
135
135
  var axios = await this.context.ready;
136
- return axios.post(`/api/v2/user/${id}/avatar/add`, avatar);
136
+ return axios.upload(`/api/v2/user/${id}/avatar/add`, {
137
+ title: "请选择上传头像文件"
138
+ });
137
139
  }
138
140
  get approval() {
139
141
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.1.74",
3
+ "version": "1.1.76",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -191,6 +191,7 @@ export class ProjectGateway extends Object {
191
191
  return axios.getAndSave(`/api/v2/coremde-sale/project/inquiry/export`, {
192
192
  params: {
193
193
  id,
194
+ fileName
194
195
  }
195
196
  },fileName);
196
197
  });
package/user_gateway.ts CHANGED
@@ -146,9 +146,11 @@ export class UserGateway extends Object {
146
146
  return axios.post("/api/v2/user/delete?id=" + id);
147
147
  }
148
148
 
149
- async avatar(id: number, avatar: FormData) {
149
+ async avatar(id: number) {
150
150
  var axios = await this.context.ready;
151
- return axios.post(`/api/v2/user/${id}/avatar/add`, avatar);
151
+ return axios.upload(`/api/v2/user/${id}/avatar/add`, {
152
+ title: "请选择上传头像文件"
153
+ });
152
154
  }
153
155
 
154
156
  get approval() {