@cpzxrobot/sdk 1.2.27 → 1.2.28

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.
@@ -101,9 +101,9 @@ class FactoryGateway extends Object {
101
101
  return response.data;
102
102
  }
103
103
  //获得工厂的所有单元信息,以车间为单位树状结构
104
- async units(id) {
104
+ async units(id = undefined) {
105
105
  var axios = await this.context.ready;
106
- if (id === null) {
106
+ if (!id) {
107
107
  var farm = await this.context.user.getSelectedFarm();
108
108
  id = farm.id;
109
109
  }
@@ -116,9 +116,9 @@ export class FactoryGateway extends Object {
116
116
  }
117
117
 
118
118
  //获得工厂的所有单元信息,以车间为单位树状结构
119
- async units(id: number|undefined): Promise<any> {
119
+ async units(id: number|undefined = undefined): Promise<any> {
120
120
  var axios = await this.context.ready;
121
- if (id === null) {
121
+ if (!id) {
122
122
  var farm = await this.context.user.getSelectedFarm();
123
123
  id = farm.id;
124
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.2.27",
3
+ "version": "1.2.28",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {