@cpzxrobot/sdk 1.2.93 → 1.2.94

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.
@@ -197,13 +197,13 @@ class WebPlatform {
197
197
  };
198
198
  }
199
199
  ready() {
200
- throw new Error("Method not implemented.");
200
+ return Promise.resolve(true);
201
201
  }
202
202
  getSelectedFarmFromMiniApp() {
203
- throw new Error("Method not available in web platform");
203
+ return Promise.resolve(this._selectedFarm);
204
204
  }
205
205
  getSelectedUnitFromMiniApp() {
206
- throw new Error("Method not available in web platform");
206
+ return Promise.resolve(this._selectedUnit);
207
207
  }
208
208
  jumpToMiniApp(url) {
209
209
  window.location.href = url;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.2.93",
3
+ "version": "1.2.94",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/web_platform.ts CHANGED
@@ -214,14 +214,14 @@ export class WebPlatform implements PlatformInterface {
214
214
  };
215
215
  }
216
216
  ready(): Promise<boolean> {
217
- throw new Error("Method not implemented.");
217
+ return Promise.resolve(true);
218
218
  }
219
219
  getSelectedFarmFromMiniApp(): Promise<any> {
220
- throw new Error("Method not available in web platform");
220
+ return Promise.resolve(this._selectedFarm);
221
221
  }
222
222
 
223
223
  getSelectedUnitFromMiniApp(): Promise<any> {
224
- throw new Error("Method not available in web platform");
224
+ return Promise.resolve(this._selectedUnit);
225
225
  }
226
226
 
227
227
  jumpToMiniApp(url: string): Promise<void> {