@cpzxrobot/sdk 1.3.12 → 1.3.14

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.
@@ -89,17 +89,31 @@ class UserGateway extends Object {
89
89
  var axios = await this.context.ready;
90
90
  return axios.post("/api/v2/user/delete?id=" + id);
91
91
  }
92
- async avatar(id) {
93
- var axios = await this.context.ready;
94
- return axios.upload(`/api/v2/user/${id}/avatar/add`, {
95
- title: "请选择上传头像文件"
96
- });
92
+ get avatar() {
93
+ return {
94
+ add: async (id) => {
95
+ var axios = await this.context.ready;
96
+ return axios.upload(`/api/v2/user/${id}/avatar/add`, {
97
+ title: "请选择上传头像文件"
98
+ });
99
+ },
100
+ get: async (id) => {
101
+ var axios = await this.context.ready;
102
+ return axios.get(`/api/v2/user/${id}/avatar`);
103
+ }
104
+ };
97
105
  }
98
- async sign(id) {
99
- var axios = await this.context.ready;
100
- return axios.upload(`/api/v2/user/${id}/sign/add`, {
101
- title: "请选择上传电子签名文件"
102
- });
106
+ get sign() {
107
+ return {
108
+ add: async (id) => {
109
+ var axios = await this.context.ready;
110
+ return axios.upload(`/api/v2/user/${id}/sign/add`);
111
+ },
112
+ get: async (id) => {
113
+ var axios = await this.context.ready;
114
+ return axios.get(`/api/v2/user/${id}/sign`);
115
+ }
116
+ };
103
117
  }
104
118
  get approval() {
105
119
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.3.12",
3
+ "version": "1.3.14",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/user_gateway.ts CHANGED
@@ -112,18 +112,32 @@ export class UserGateway extends Object {
112
112
  return axios.post("/api/v2/user/delete?id=" + id);
113
113
  }
114
114
 
115
- async avatar(id: number) {
116
- var axios = await this.context.ready;
117
- return axios.upload(`/api/v2/user/${id}/avatar/add`, {
118
- title: "请选择上传头像文件"
119
- });
115
+ get avatar() {
116
+ return {
117
+ add: async (id: number) => {
118
+ var axios = await this.context.ready;
119
+ return axios.upload(`/api/v2/user/${id}/avatar/add`, {
120
+ title: "请选择上传头像文件"
121
+ });
122
+ },
123
+ get: async (id: number) => {
124
+ var axios = await this.context.ready;
125
+ return axios.get(`/api/v2/user/${id}/avatar`);
126
+ }
127
+ }
120
128
  }
121
129
 
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
- });
130
+ get sign() {
131
+ return {
132
+ add: async (id: number) => {
133
+ var axios = await this.context.ready;
134
+ return axios.upload(`/api/v2/user/${id}/sign/add`);
135
+ },
136
+ get: async (id: number) => {
137
+ var axios = await this.context.ready;
138
+ return axios.get(`/api/v2/user/${id}/sign`);
139
+ }
140
+ }
127
141
  }
128
142
 
129
143
  get approval() {