@cpzxrobot/sdk 1.0.76 → 1.0.77
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/device_filter.ts +8 -4
- package/dist/device_filter.js +9 -4
- package/package.json +1 -1
package/device_filter.ts
CHANGED
|
@@ -200,11 +200,15 @@ export abstract class DeviceFilter<T extends { id: number }> {
|
|
|
200
200
|
}
|
|
201
201
|
})
|
|
202
202
|
.then((res: AxiosResponse) => {
|
|
203
|
-
if (
|
|
204
|
-
|
|
203
|
+
if (args.type == "raw") {
|
|
204
|
+
return res;
|
|
205
|
+
} else {
|
|
206
|
+
if (res.data.Error) {
|
|
207
|
+
throw res.data.Error;
|
|
208
|
+
}
|
|
209
|
+
// this.devices.push(res.data);
|
|
210
|
+
return res.data;
|
|
205
211
|
}
|
|
206
|
-
// this.devices.push(res.data);
|
|
207
|
-
return res.data;
|
|
208
212
|
});
|
|
209
213
|
}
|
|
210
214
|
|
package/dist/device_filter.js
CHANGED
|
@@ -180,11 +180,16 @@ class DeviceFilter {
|
|
|
180
180
|
}
|
|
181
181
|
})
|
|
182
182
|
.then((res) => {
|
|
183
|
-
if (
|
|
184
|
-
|
|
183
|
+
if (args.type == "raw") {
|
|
184
|
+
return res;
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
if (res.data.Error) {
|
|
188
|
+
throw res.data.Error;
|
|
189
|
+
}
|
|
190
|
+
// this.devices.push(res.data);
|
|
191
|
+
return res.data;
|
|
185
192
|
}
|
|
186
|
-
// this.devices.push(res.data);
|
|
187
|
-
return res.data;
|
|
188
193
|
});
|
|
189
194
|
}
|
|
190
195
|
//按月获取数据:period = '1mo',按天获取数据:period = '1d'
|