@cpzxrobot/sdk 1.1.48 → 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
  }
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.48",
3
+ "version": "1.1.49",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
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
  }