@cpzxrobot/sdk 1.0.6 → 1.0.7

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.
Files changed (3) hide show
  1. package/index.ts +4 -4
  2. package/package.json +1 -1
  3. package/types.d.ts +3 -2
package/index.ts CHANGED
@@ -31,9 +31,9 @@ export class Cpzxrobot {
31
31
  _getSelectedFarmFromMiniApp!: () => any;
32
32
  _getSelectedUnitFromMiniApp!: () => any;
33
33
  _jumpToMiniApp!: (url: string) => any;
34
- setTitle: Function = () => {};
35
- saveBase64: Function = (base64: string, filename: string) => {};
36
- saveBlob: Function = (blob: Blob, filename: string) => {};
34
+ setTitle!: (title: string) => void;
35
+ saveBase64!: (base64: string, filename: string) => void;
36
+ saveBlob!: (blob: Blob, filename: string) => void;
37
37
  assistant: AssistantGateway;
38
38
  energy: EnergyGateway;
39
39
  camera: CameraGateway;
@@ -140,7 +140,7 @@ export class Cpzxrobot {
140
140
  return platform.callHandler("app.openMiniapp", url);
141
141
  };
142
142
  this.setTitle = function (title: string) {
143
- return platform.callHandler("app.setTitle", title);
143
+ platform.callHandler("app.setTitle", title);
144
144
  };
145
145
  this.saveBlob = this._saveBlobAsBase64;
146
146
  this.saveBase64 = function (base64: string, filename: string) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/types.d.ts CHANGED
@@ -132,8 +132,9 @@ export class Cpzxrobot {
132
132
  axios: MyAxiosInstance;
133
133
  _getSelectedFarmFromMiniApp: () => Promise<Factory>;
134
134
  _getSelectedUnitFromMiniApp: () => Promise<Unit>;
135
- saveBase64: Function = (base64: string, filename: string) => {};
136
- saveBlob: Function = (blob: Blob, filename: string) => {};
135
+ setTitle: (title: string) => void;
136
+ saveBase64: (base64: string, filename: string) => void;
137
+ saveBlob: (blob: Blob, filename: string) => void;
137
138
  }
138
139
 
139
140
  declare global {