@cpzxrobot/sdk 1.1.47 → 1.1.49

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/index.js CHANGED
@@ -82,10 +82,8 @@ class Cpzxrobot {
82
82
  });
83
83
  // @ts-ignore
84
84
  instance.getAndSave = (url, data, fileName) => {
85
- return instance.get(url, {
86
- responseType: "blob",
87
- params: data,
88
- }).then((res) => {
85
+ var args = Object.assign({ responseType: "blob" }, data);
86
+ return instance.get(url, args).then((res) => {
89
87
  this.saveBlob(res.data, fileName || "file");
90
88
  });
91
89
  };
@@ -172,6 +172,12 @@ class UserGateway extends Object {
172
172
  yearMonth
173
173
  });
174
174
  });
175
+ },
176
+ //获取打卡详情
177
+ get: (id) => {
178
+ return this.context.ready.then((axios) => {
179
+ return axios.get(`/api/v2/coremde-sale/checkin/get?id=${id}`);
180
+ });
175
181
  }
176
182
  };
177
183
  }
@@ -224,5 +230,10 @@ class UserGateway extends Object {
224
230
  },
225
231
  };
226
232
  }
233
+ info() {
234
+ return this.context.ready.then((axios) => {
235
+ return axios.get(`/api/v1/user/info`);
236
+ });
237
+ }
227
238
  }
228
239
  exports.UserGateway = UserGateway;
package/index.ts CHANGED
@@ -114,10 +114,11 @@ export class Cpzxrobot {
114
114
  );
115
115
  // @ts-ignore
116
116
  instance.getAndSave = (url: string, data?: any, fileName?: string) => {
117
- return instance.get(url, {
117
+ var args = {
118
118
  responseType: "blob",
119
- params: data,
120
- }).then((res) => {
119
+ ...data,
120
+ };
121
+ return instance.get(url, args).then((res) => {
121
122
  this.saveBlob(res.data, fileName || "file");
122
123
  });
123
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.1.47",
3
+ "version": "1.1.49",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -48,6 +48,7 @@ export class ProductGateway extends Object {
48
48
  export: (args: {
49
49
  pageNo: number;
50
50
  pageSize: number;
51
+ createUserId: number;
51
52
  fileName?: string;
52
53
  }) => {
53
54
  if (!args.fileName) {
package/readme.md CHANGED
@@ -143,6 +143,7 @@ baseURL: "/"
143
143
  | cpzxrobot().user.add | 添加用户 |
144
144
  | cpzxrobot().user.update | 更新用户 |
145
145
  | cpzxrobot().user.list | 列出用户(传入工厂) |
146
+ | cpzxrobot().user.info | 获取用户信息,传入userId参数 |
146
147
  | cpzxrobot().user.approval.list | 获取用户审批列表,传入userId和status参数 |
147
148
  | cpzxrobot().user.approval.count | 获取用户审批列表的数量,传入userId和status参数 |
148
149
  | cpzxrobot().user.checkin.add | 添加用户签到记录,传入userId和address参数 |
package/user_gateway.ts CHANGED
@@ -194,6 +194,12 @@ export class UserGateway extends Object {
194
194
  yearMonth
195
195
  });
196
196
  });
197
+ },
198
+ //获取打卡详情
199
+ get: (id: number) => {
200
+ return this.context.ready.then((axios) => {
201
+ return axios.get(`/api/v2/coremde-sale/checkin/get?id=${id}`);
202
+ });
197
203
  }
198
204
  };
199
205
  }
@@ -249,4 +255,10 @@ export class UserGateway extends Object {
249
255
  },
250
256
  }
251
257
  }
258
+
259
+ info() {
260
+ return this.context.ready.then((axios) => {
261
+ return axios.get(`/api/v1/user/info`);
262
+ });
263
+ }
252
264
  }