@lambo-design-mobile/lambo-js-bridge 1.0.0-beta.28 → 1.0.0-beta.30

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import LamboJsBridge from './src/sdk/LamboJsBridge'
2
-
3
- export default LamboJsBridge
1
+ import LamboJsBridge from './src/sdk/LamboJsBridge'
2
+
3
+ export default LamboJsBridge
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design-mobile/lambo-js-bridge",
3
- "version": "1.0.0-beta.28",
3
+ "version": "1.0.0-beta.30",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -1,63 +1,63 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
2
- /* eslint-disable no-undef */
3
-
4
- class BrowserAdapter {
5
- constructor(_options) {
6
- // this.appId = _options.appId; // 保存 appId 以便在 getInitInfo 中使用
7
- // 由于是假数据,不需要加载任何实际的脚本
8
- this.init(_options);
9
- }
10
-
11
- async init(options) {
12
- console.log("Initializing with options:", options);
13
- // 模拟初始化操作
14
- return Promise.resolve({
15
- success: true,
16
- message: "Initialized successfully"
17
- });
18
- }
19
-
20
- async getLocation(options) {
21
- console.log(options);
22
- // 返回假位置数据
23
- return Promise.resolve({
24
- latitude: 37.7749, // 假数据
25
- longitude: -122.4194, // 假数据
26
- accuracy: 30 // 假数据
27
- });
28
- }
29
-
30
- async openLocation(options) {
31
- console.log(options);
32
- // 模拟打开位置操作
33
- return Promise.resolve({
34
- success: true,
35
- message: "Location opened successfully"
36
- });
37
- }
38
-
39
- async scanCode(options) {
40
- console.log(options);
41
- // 返回假扫码数据
42
- return Promise.resolve({resultStr:"SCAN_CODE_RESULT"});
43
- }
44
-
45
- async takePhoto(options) {
46
- console.log(options);
47
- // 返回假照片数据
48
- return Promise.resolve({
49
- imageInfo: "FAKE_IMAGE_INFO",
50
- imageData: "FAKE_IMAGE_DATA"
51
- });
52
- }
53
-
54
- async getPlatform(options = {}) {
55
- // 获取初始化信息
56
- return {
57
- appId: 'Example_appId',
58
- platform: 'Browser'
59
- };
60
- }
61
- }
62
-
63
- export default BrowserAdapter;
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ /* eslint-disable no-undef */
3
+
4
+ class BrowserAdapter {
5
+ constructor(_options) {
6
+ // this.appId = _options.appId; // 保存 appId 以便在 getInitInfo 中使用
7
+ // 由于是假数据,不需要加载任何实际的脚本
8
+ this.init(_options);
9
+ }
10
+
11
+ async init(options) {
12
+ console.log("Initializing with options:", options);
13
+ // 模拟初始化操作
14
+ return Promise.resolve({
15
+ success: true,
16
+ message: "Initialized successfully"
17
+ });
18
+ }
19
+
20
+ async getLocation(options) {
21
+ console.log(options);
22
+ // 返回假位置数据
23
+ return Promise.resolve({
24
+ latitude: 37.7749, // 假数据
25
+ longitude: -122.4194, // 假数据
26
+ accuracy: 30 // 假数据
27
+ });
28
+ }
29
+
30
+ async openLocation(options) {
31
+ console.log(options);
32
+ // 模拟打开位置操作
33
+ return Promise.resolve({
34
+ success: true,
35
+ message: "Location opened successfully"
36
+ });
37
+ }
38
+
39
+ async scanCode(options) {
40
+ console.log(options);
41
+ // 返回假扫码数据
42
+ return Promise.resolve({resultStr:"SCAN_CODE_RESULT"});
43
+ }
44
+
45
+ async takePhoto(options) {
46
+ console.log(options);
47
+ // 返回假照片数据
48
+ return Promise.resolve({
49
+ imageInfo: "FAKE_IMAGE_INFO",
50
+ imageData: "FAKE_IMAGE_DATA"
51
+ });
52
+ }
53
+
54
+ async getPlatform(options = {}) {
55
+ // 获取初始化信息
56
+ return {
57
+ appId: 'Example_appId',
58
+ platform: 'Browser'
59
+ };
60
+ }
61
+ }
62
+
63
+ export default BrowserAdapter;
@@ -1,21 +1,21 @@
1
- class CordovaAdapter {
2
- async getLocation(options) {
3
- // 实现Cordova获取位置逻辑,可能涉及到cordova-plugin-geolocation插件的使用
4
- console.log('Cordova: Getting location with options', options);
5
- // 这里应替换为Cordova API的实际调用
6
- }
7
-
8
- async scanCode(options) {
9
- // 实现Cordova扫码逻辑,可能需要集成第三方插件
10
- console.log('Cordova: Scanning code with options', options);
11
- // 这里应替换为Cordova插件调用或自定义实现
12
- }
13
-
14
- async takePhoto(options) {
15
- // 实现Cordova拍照或选择图片逻辑,可能使用cordova-plugin-camera插件
16
- console.log('Cordova: Taking photo with options', options);
17
- // 这里应替换为Cordova插件调用
18
- }
19
- }
20
-
1
+ class CordovaAdapter {
2
+ async getLocation(options) {
3
+ // 实现Cordova获取位置逻辑,可能涉及到cordova-plugin-geolocation插件的使用
4
+ console.log('Cordova: Getting location with options', options);
5
+ // 这里应替换为Cordova API的实际调用
6
+ }
7
+
8
+ async scanCode(options) {
9
+ // 实现Cordova扫码逻辑,可能需要集成第三方插件
10
+ console.log('Cordova: Scanning code with options', options);
11
+ // 这里应替换为Cordova插件调用或自定义实现
12
+ }
13
+
14
+ async takePhoto(options) {
15
+ // 实现Cordova拍照或选择图片逻辑,可能使用cordova-plugin-camera插件
16
+ console.log('Cordova: Taking photo with options', options);
17
+ // 这里应替换为Cordova插件调用
18
+ }
19
+ }
20
+
21
21
  export default CordovaAdapter;
@@ -1,21 +1,21 @@
1
- class DingTalkAdapter {
2
- async getLocation(options) {
3
- // 实现钉钉获取位置逻辑
4
- console.log('DingTalk: Getting location with options', options);
5
- // 这里应替换为钉钉API的实际调用
6
- }
7
-
8
- async scanCode(options) {
9
- // 实现钉钉扫码逻辑
10
- console.log('DingTalk: Scanning code with options', options);
11
- // 这里应替换为钉钉API的实际调用
12
- }
13
-
14
- async takePhoto(options) {
15
- // 实现钉钉拍照或选择图片逻辑
16
- console.log('DingTalk: Taking photo with options', options);
17
- // 这里应替换为钉钉API的实际调用
18
- }
19
- }
20
-
1
+ class DingTalkAdapter {
2
+ async getLocation(options) {
3
+ // 实现钉钉获取位置逻辑
4
+ console.log('DingTalk: Getting location with options', options);
5
+ // 这里应替换为钉钉API的实际调用
6
+ }
7
+
8
+ async scanCode(options) {
9
+ // 实现钉钉扫码逻辑
10
+ console.log('DingTalk: Scanning code with options', options);
11
+ // 这里应替换为钉钉API的实际调用
12
+ }
13
+
14
+ async takePhoto(options) {
15
+ // 实现钉钉拍照或选择图片逻辑
16
+ console.log('DingTalk: Taking photo with options', options);
17
+ // 这里应替换为钉钉API的实际调用
18
+ }
19
+ }
20
+
21
21
  export default DingTalkAdapter;