@cpzxrobot/sdk 1.3.11 → 1.3.13

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,11 +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
+ };
105
+ }
106
+ get sign() {
107
+ return {
108
+ add: async (id) => {
109
+ var axios = await this.context.ready;
110
+ return axios.post(`/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
+ };
97
117
  }
98
118
  get approval() {
99
119
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.3.11",
3
+ "version": "1.3.13",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/user_gateway.ts CHANGED
@@ -112,11 +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
+ }
128
+ }
129
+
130
+ get sign() {
131
+ return {
132
+ add: async (id: number) => {
133
+ var axios = await this.context.ready;
134
+ return axios.post(`/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
+ }
120
141
  }
121
142
 
122
143
  get approval() {