@cpzxrobot/sdk 1.3.91 → 1.3.92

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.
@@ -20,6 +20,9 @@ class MobilePlatform {
20
20
  // @ts-ignore
21
21
  this.platform = window.flutter_inappwebview;
22
22
  }
23
+ openFactorySelector() {
24
+ throw new Error("Method not implemented.");
25
+ }
23
26
  addMessage(message) {
24
27
  if (message.id != undefined) {
25
28
  const callback = this.sseCallbacks[message.id];
@@ -21,6 +21,12 @@ class WebPlatform {
21
21
  this._defaultSelectedFarm = selectedFarm;
22
22
  this._defaultSelectedUnit = selectedUnit;
23
23
  }
24
+ openFactorySelector() {
25
+ //call open function of factory-selector
26
+ var factorySelector = document.getElementById("cpzxrobot-factory-selector");
27
+ //@ts-ignore
28
+ factorySelector.open();
29
+ }
24
30
  addMessage(_message) {
25
31
  throw new Error("Method not implemented.");
26
32
  }
@@ -18,6 +18,9 @@ class WindwosMiniAppPlatform {
18
18
  this.appCode = "";
19
19
  this.baseURL = "";
20
20
  }
21
+ openFactorySelector() {
22
+ throw new Error("Method not implemented.");
23
+ }
21
24
  addMessage(message) {
22
25
  if (message.id != undefined) {
23
26
  const callback = this.sseCallbacks[message.id];
@@ -16,6 +16,11 @@ export class MobilePlatform implements PlatformInterface {
16
16
  this.platform = window.flutter_inappwebview;
17
17
 
18
18
  }
19
+
20
+ openFactorySelector(): void {
21
+ throw new Error("Method not implemented.");
22
+ }
23
+
19
24
  addMessage(message: any): void {
20
25
  if (message.id != undefined) {
21
26
  const callback = this.sseCallbacks[message.id];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.3.91",
3
+ "version": "1.3.92",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -31,4 +31,6 @@ export abstract class PlatformInterface {
31
31
  abstract ready(): Promise<boolean>;
32
32
  abstract setSelectedUnit(unit: Unit | String | Number): void;
33
33
  abstract setSelectedFarm(farm: Factory | String | Number): void;
34
+ //change factory
35
+ abstract openFactorySelector():void;
34
36
  }
package/web_platform.ts CHANGED
@@ -18,6 +18,12 @@ export class WebPlatform implements PlatformInterface {
18
18
  this._defaultSelectedFarm = selectedFarm;
19
19
  this._defaultSelectedUnit = selectedUnit;
20
20
  }
21
+ openFactorySelector() {
22
+ //call open function of factory-selector
23
+ var factorySelector = document.getElementById("cpzxrobot-factory-selector");
24
+ //@ts-ignore
25
+ factorySelector.open();
26
+ }
21
27
  addMessage(_message: any): void {
22
28
  throw new Error("Method not implemented.");
23
29
  }
@@ -10,6 +10,9 @@ export class WindwosMiniAppPlatform implements PlatformInterface {
10
10
 
11
11
  constructor() {
12
12
 
13
+ }
14
+ openFactorySelector(): void {
15
+ throw new Error("Method not implemented.");
13
16
  }
14
17
  addMessage(message: any): void {
15
18
  if (message.id != undefined) {