@cpzxrobot/sdk 1.1.93 → 1.1.95
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 +5 -0
- package/index.ts +6 -0
- package/package.json +1 -1
- package/readme.md +1 -0
- package/types.d.ts +1 -0
- package/unit_gateway.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -155,6 +155,8 @@ class Cpzxrobot {
|
|
|
155
155
|
this.saveBase64 = window.miniapp.saveBase64;
|
|
156
156
|
// @ts-ignore
|
|
157
157
|
this.vibrate = window.miniapp.vibrate;
|
|
158
|
+
// @ts-ignore
|
|
159
|
+
this.reloadGroup = window.miniapp.reloadGroup;
|
|
158
160
|
this.saveBlob = this._saveBlobAsBase64;
|
|
159
161
|
// @ts-ignore
|
|
160
162
|
this.getGeo = window.miniapp.getGeo;
|
|
@@ -197,6 +199,9 @@ class Cpzxrobot {
|
|
|
197
199
|
this.vibrate = function (time) {
|
|
198
200
|
return platform.callHandler("app.vibrate", time);
|
|
199
201
|
};
|
|
202
|
+
this.reloadGroup = function (group) {
|
|
203
|
+
return platform.callHandler("app.reloadGroup", group);
|
|
204
|
+
};
|
|
200
205
|
this.axios = {
|
|
201
206
|
get: function (url, data) {
|
|
202
207
|
return platform.callHandler("axios_get", url, data);
|
package/index.ts
CHANGED
|
@@ -46,6 +46,7 @@ export class Cpzxrobot {
|
|
|
46
46
|
saveBlob!: (blob: Blob, filename: string) => void;
|
|
47
47
|
scanQrcode!: () => Promise<string>;
|
|
48
48
|
vibrate!: (time?: number) => void;
|
|
49
|
+
reloadGroup!: (key: string) => void;
|
|
49
50
|
getGeo!: () => Promise<{
|
|
50
51
|
lat: number;
|
|
51
52
|
lng: number;
|
|
@@ -191,6 +192,8 @@ export class Cpzxrobot {
|
|
|
191
192
|
this.saveBase64 = window.miniapp.saveBase64;
|
|
192
193
|
// @ts-ignore
|
|
193
194
|
this.vibrate = window.miniapp.vibrate;
|
|
195
|
+
// @ts-ignore
|
|
196
|
+
this.reloadGroup= window.miniapp.reloadGroup;
|
|
194
197
|
this.saveBlob = this._saveBlobAsBase64;
|
|
195
198
|
// @ts-ignore
|
|
196
199
|
this.getGeo = window.miniapp.getGeo;
|
|
@@ -236,6 +239,9 @@ export class Cpzxrobot {
|
|
|
236
239
|
this.vibrate = function (time?: number) {
|
|
237
240
|
return platform.callHandler("app.vibrate", time);
|
|
238
241
|
};
|
|
242
|
+
this.reloadGroup = function (group: string) {
|
|
243
|
+
return platform.callHandler("app.reloadGroup", group);
|
|
244
|
+
};
|
|
239
245
|
this.axios = {
|
|
240
246
|
get: function (url, data) {
|
|
241
247
|
return platform.callHandler("axios_get", url, data);
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -134,6 +134,7 @@ baseURL: "/"
|
|
|
134
134
|
| cpzxrobot().pigfarm.threshold | 获取单元中特定类型的阈值信息 |
|
|
135
135
|
| cpzxrobot().scanQrcode | 调用扫码功能,获得扫码文字 |
|
|
136
136
|
| cpzxrobot().vibrate | 调用震动功能 |
|
|
137
|
+
| cpzxrobot().reloadGroup | 重新加载组织机构信息,传入字符串类型的工厂(公司)id |
|
|
137
138
|
| cpzxrobot().unit.v2.list | 获得单元列表,v2版本 |
|
|
138
139
|
| cpzxrobot().unit.v2.add | 添加单元,v2版本 |
|
|
139
140
|
| cpzxrobot().unit.v2.update | 更新单元,v2版本 |
|
package/types.d.ts
CHANGED
|
@@ -339,6 +339,7 @@ class Cpzxrobot {
|
|
|
339
339
|
saveBlob: (blob: Blob, filename: string) => void;
|
|
340
340
|
scanQrcode: () => Promise<string>;
|
|
341
341
|
vibrate: (time?: number) => void;
|
|
342
|
+
reloadGroup: (key: string) => void;
|
|
342
343
|
getGeo: () => Promise<{ lat: number; lng: number }>;
|
|
343
344
|
}
|
|
344
345
|
|
package/unit_gateway.ts
CHANGED
|
@@ -105,6 +105,7 @@ export class UnitGateway extends Object {
|
|
|
105
105
|
bind: (unitDayage: {
|
|
106
106
|
unitId: Number;
|
|
107
107
|
dayage: Number;
|
|
108
|
+
isTempBatch: Boolean;
|
|
108
109
|
}[], batchNo: string, type: "pigfarm") => {
|
|
109
110
|
return this.context.ready.then((axios) => {
|
|
110
111
|
return axios.post(`/api/v2/batch/unit/bind`, {
|