@cpzxrobot/sdk 1.3.55 → 1.3.56

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.
@@ -266,10 +266,14 @@ class UserGateway extends Object {
266
266
  },
267
267
  };
268
268
  }
269
- async info() {
269
+ async info(userId) {
270
270
  var axios = await this.context.ready;
271
271
  var factory = await this.context.user.getSelectedFarm();
272
- return axios.get(`/api/v1/user/info`, {
272
+ var url = '/api/v1/user/info';
273
+ if (userId) {
274
+ url += `/${userId}`;
275
+ }
276
+ return axios.get(url, {
273
277
  params: {
274
278
  selected_factory: factory,
275
279
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.3.55",
3
+ "version": "1.3.56",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/user_gateway.ts CHANGED
@@ -322,10 +322,14 @@ export class UserGateway extends Object {
322
322
  }
323
323
  }
324
324
 
325
- async info() {
325
+ async info(userId: number|undefined) {
326
326
  var axios = await this.context.ready
327
327
  var factory = await this.context.user.getSelectedFarm()
328
- return axios.get(`/api/v1/user/info`, {
328
+ var url = '/api/v1/user/info'
329
+ if (userId) {
330
+ url += `/${userId}`
331
+ }
332
+ return axios.get(url, {
329
333
  params: {
330
334
  selected_factory: factory,
331
335
  },