@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.
- package/dist/user_gateway.js +25 -5
- package/package.json +1 -1
- package/user_gateway.ts +26 -5
package/dist/user_gateway.js
CHANGED
|
@@ -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
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
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
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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() {
|