@kbapp/js-bridge 0.4.8-alpha.0 → 1.0.0-alpha.0
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/LOGIN.MD +79 -0
- package/README.MD +1045 -182
- package/dist/core/index.d.ts +68 -16
- package/dist/index.d.ts +8 -5
- package/dist/index.es.js +516 -0
- package/dist/index.umd.js +1 -0
- package/dist/lib/app-version-support.d.ts +41 -0
- package/dist/lib/bridge-code.d.ts +14 -0
- package/dist/lib/check-for-new-version.d.ts +7 -5
- package/dist/lib/close-webview.d.ts +6 -2
- package/dist/lib/define-permission-usage.d.ts +8 -2
- package/dist/lib/generate-kb-sign.d.ts +13 -2
- package/dist/lib/{get-device-info.d.ts → get-app-base-info.d.ts} +14 -7
- package/dist/lib/open-post-editor.d.ts +47 -4
- package/dist/lib/report-da-event.d.ts +33 -0
- package/dist/lib/run-action.d.ts +9 -5
- package/dist/lib/save-image-to-local.d.ts +8 -4
- package/dist/lib/save-video-to-local.d.ts +7 -3
- package/dist/lib/scan-qr-code.d.ts +23 -0
- package/dist/lib/screen-orientation.d.ts +13 -0
- package/dist/lib/set-webview-title.d.ts +7 -3
- package/dist/lib/share-image.d.ts +21 -0
- package/dist/lib/share-model.d.ts +170 -45
- package/dist/lib/subscribe-notify.d.ts +25 -0
- package/dist/lib/trigger-login.d.ts +18 -10
- package/dist/utils/filter-undefined-properties.d.ts +6 -0
- package/dist/utils/promise-cache.d.ts +5 -0
- package/dist/utils/wrap-async.d.ts +17 -0
- package/examples/index.html +236 -0
- package/package.json +17 -4
- package/vite.config.ts +32 -0
- package/dist/core/index.js +0 -84
- package/dist/core/lib/ds-bridge.d.ts +0 -7
- package/dist/core/lib/ds-bridge.js +0 -126
- package/dist/core/lib/flutter-ds-bridge.js +0 -172
- package/dist/core/lib/js-bridge.d.ts +0 -22
- package/dist/core/lib/js-bridge.js +0 -188
- package/dist/index.js +0 -33
- package/dist/lib/can-i-use.d.ts +0 -13
- package/dist/lib/can-i-use.js +0 -102
- package/dist/lib/check-for-new-version.js +0 -26
- package/dist/lib/close-webview.js +0 -24
- package/dist/lib/define-permission-usage.js +0 -40
- package/dist/lib/generate-kb-sign.js +0 -75
- package/dist/lib/get-device-info.js +0 -36
- package/dist/lib/js-bridge-code.d.ts +0 -10
- package/dist/lib/js-bridge-code.js +0 -14
- package/dist/lib/open-post-editor.js +0 -116
- package/dist/lib/report-getui.d.ts +0 -14
- package/dist/lib/report-getui.js +0 -17
- package/dist/lib/run-action.js +0 -29
- package/dist/lib/save-image-to-local.js +0 -28
- package/dist/lib/save-video-to-local.js +0 -28
- package/dist/lib/set-webview-title.js +0 -27
- package/dist/lib/share-model.js +0 -80
- package/dist/lib/share-poster.d.ts +0 -16
- package/dist/lib/share-poster.js +0 -26
- package/dist/lib/trigger-login.js +0 -195
- package/dist/util/promise-cache.d.ts +0 -5
- package/dist/util/promise-cache.js +0 -24
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BridgeCode } from './bridge-code';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @description 判断当前版本号是否 大于等于 minVersion
|
|
6
|
+
* @example
|
|
7
|
+
* **示例代码**
|
|
8
|
+
```js
|
|
9
|
+
import { isAppVersionSupport } from '@kbapp/market-partner-sdk';
|
|
10
|
+
|
|
11
|
+
isAppVersionSupport({
|
|
12
|
+
minVersion: 80711,
|
|
13
|
+
success(result: boolean) {
|
|
14
|
+
console.log('是否能使用', result)
|
|
15
|
+
}
|
|
16
|
+
})
|
|
17
|
+
```
|
|
18
|
+
*/
|
|
19
|
+
export declare const isAppVersionSupport: (params: {
|
|
20
|
+
minVersion: number;
|
|
21
|
+
} & {
|
|
22
|
+
success?: ((res: boolean) => void) | undefined;
|
|
23
|
+
fail?: (error: BridgeCode) => void;
|
|
24
|
+
complete?: () => void;
|
|
25
|
+
}) => Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @description 装饰器. 检查app版本是否支持某个api, 如果不支持, 则抛出错误
|
|
29
|
+
* @example
|
|
30
|
+
* **示例代码**
|
|
31
|
+
```js
|
|
32
|
+
import { decorateAppVersionSupport } from '@kbapp/market-partner-sdk';
|
|
33
|
+
|
|
34
|
+
const onTapLogin = decorateAppVersionSupport({ minVersion: 80711 }, () => {
|
|
35
|
+
console.log('当前版本号大于80711')
|
|
36
|
+
})
|
|
37
|
+
```
|
|
38
|
+
*/
|
|
39
|
+
export declare function decorateAppVersionSupport<Callback extends (...params: any[]) => any>(config: {
|
|
40
|
+
minVersion: number;
|
|
41
|
+
}, callback: Callback): (...params: Parameters<Callback>) => Promise<any>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class BridgeCode {
|
|
2
|
+
/** 错误码 */
|
|
3
|
+
errorCode: number;
|
|
4
|
+
/** 错误信息 */
|
|
5
|
+
errorMsg: string;
|
|
6
|
+
constructor(params: {
|
|
7
|
+
errorCode: number;
|
|
8
|
+
errorMsg: string;
|
|
9
|
+
});
|
|
10
|
+
static UNKNOWN: BridgeCode;
|
|
11
|
+
static UNSUPPORTED_VERSION: BridgeCode;
|
|
12
|
+
static TIMEOUT: BridgeCode;
|
|
13
|
+
static UNSUPPORTED_BRIDGE_ENV: BridgeCode;
|
|
14
|
+
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
3
|
* @description 检测是否有新版本可用, iOS无论是否有最新版本都直接跳转到应用商店, 安卓如果有新版, 则弹窗提示, 没有的话toast提示无新版本
|
|
4
|
-
*
|
|
4
|
+
* 桥接type: 56
|
|
5
5
|
* **示例代码**
|
|
6
6
|
```js
|
|
7
7
|
import { checkForNewVersion } from '@kbapp/js-bridge';
|
|
8
8
|
|
|
9
|
-
checkForNewVersion(
|
|
10
|
-
title: '开吧标题'
|
|
11
|
-
})
|
|
9
|
+
checkForNewVersion()
|
|
12
10
|
```
|
|
13
11
|
*/
|
|
14
|
-
export declare
|
|
12
|
+
export declare const checkForNewVersion: (params?: {
|
|
13
|
+
success?: ((res: void) => void) | undefined;
|
|
14
|
+
fail?: (error: import('./bridge-code').BridgeCode) => void;
|
|
15
|
+
complete?: () => void;
|
|
16
|
+
} | undefined) => Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
3
|
* @description 关闭当前webview
|
|
4
|
-
*
|
|
4
|
+
* 桥接type: -1
|
|
5
5
|
* **示例代码**
|
|
6
6
|
```js
|
|
7
7
|
import { closeWebView } from '@kbapp/js-bridge';
|
|
@@ -9,4 +9,8 @@ import { closeWebView } from '@kbapp/js-bridge';
|
|
|
9
9
|
closeWebView()
|
|
10
10
|
```
|
|
11
11
|
*/
|
|
12
|
-
export declare
|
|
12
|
+
export declare const closeWebView: (params?: {
|
|
13
|
+
success?: ((res: void) => void) | undefined;
|
|
14
|
+
fail?: (error: import('./bridge-code').BridgeCode) => void;
|
|
15
|
+
complete?: () => void;
|
|
16
|
+
} | undefined) => Promise<void>;
|
|
@@ -14,6 +14,8 @@ declare enum PermissionUsage {
|
|
|
14
14
|
*
|
|
15
15
|
* @description 定义相关隐私政策文案, 用于网页授权相关权限时候, 提醒用户
|
|
16
16
|
* @example ```js
|
|
17
|
+
import { definePermissionUsage } from '@kbapp/js-bridge';
|
|
18
|
+
|
|
17
19
|
definePermissionUsage({
|
|
18
20
|
microphone: { description: '用于发帖上传音频' },
|
|
19
21
|
location: { description: '获取你选择的位置信息,用于线下导航服务' },
|
|
@@ -21,7 +23,11 @@ definePermissionUsage({
|
|
|
21
23
|
})
|
|
22
24
|
```
|
|
23
25
|
*/
|
|
24
|
-
export declare
|
|
26
|
+
export declare const definePermissionUsage: (params?: (Partial<Record<PermissionUsage, {
|
|
25
27
|
description: string;
|
|
26
|
-
}>>
|
|
28
|
+
}>> & {
|
|
29
|
+
success?: ((res: void) => void) | undefined;
|
|
30
|
+
fail?: (error: import('./bridge-code').BridgeCode) => void;
|
|
31
|
+
complete?: () => void;
|
|
32
|
+
}) | undefined) => Promise<void>;
|
|
27
33
|
export {};
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
|
-
* @description 生成kbSign
|
|
3
|
+
* @description 生成kbSign, 禁止传入kbKey
|
|
4
|
+
* 桥接type: 51
|
|
5
|
+
* @example **示例代码**
|
|
6
|
+
```js
|
|
7
|
+
import { generateKBSign } from '@kbapp/js-bridge';
|
|
8
|
+
|
|
9
|
+
const kbSign = await generateKBSign()
|
|
10
|
+
```
|
|
4
11
|
*/
|
|
5
12
|
export declare const generateKBSign: (params: {
|
|
13
|
+
[key: string]: any;
|
|
6
14
|
kbSignTime: number;
|
|
7
15
|
kbSignType: number;
|
|
8
|
-
|
|
16
|
+
} & {
|
|
17
|
+
success?: ((res: string) => void) | undefined;
|
|
18
|
+
fail?: (error: import('./bridge-code').BridgeCode) => void;
|
|
19
|
+
complete?: () => void;
|
|
9
20
|
}) => Promise<string>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
*
|
|
3
3
|
* @description app本地设备信息
|
|
4
4
|
*/
|
|
5
|
-
export declare class
|
|
5
|
+
export declare class AppBaseInfo {
|
|
6
6
|
/** 例如iOS */
|
|
7
7
|
do: string;
|
|
8
8
|
/** 例如iPhone11,2 */
|
|
@@ -25,13 +25,20 @@ export declare class AppDeviceInfo {
|
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
* @description 获取设备信息
|
|
28
|
-
*
|
|
29
|
-
* **示例代码**
|
|
28
|
+
* 桥接type: 35
|
|
29
|
+
* @example **示例代码**
|
|
30
30
|
```js
|
|
31
|
-
import {
|
|
31
|
+
import { getAppBaseInfo } from '@kbapp/js-bridge';
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
deviceInfo
|
|
33
|
+
getAppBaseInfo({
|
|
34
|
+
success(deviceInfo) {
|
|
35
|
+
console.log(deviceInfo)
|
|
36
|
+
}
|
|
37
|
+
})
|
|
35
38
|
```
|
|
36
39
|
*/
|
|
37
|
-
export declare const
|
|
40
|
+
export declare const getAppBaseInfo: (params?: {
|
|
41
|
+
success?: ((res: AppBaseInfo) => void) | undefined;
|
|
42
|
+
fail?: (error: import('./bridge-code').BridgeCode) => void;
|
|
43
|
+
complete?: () => void;
|
|
44
|
+
} | undefined) => Promise<AppBaseInfo>;
|
|
@@ -56,9 +56,32 @@ export declare function createPostEditorParams(params?: Partial<PostEditorParams
|
|
|
56
56
|
};
|
|
57
57
|
/**
|
|
58
58
|
*
|
|
59
|
-
* @description
|
|
59
|
+
* @description 唤起app发帖器
|
|
60
|
+
* 桥接type: 13
|
|
60
61
|
*/
|
|
61
|
-
export declare
|
|
62
|
+
export declare const openPostEditor: (...args: [params?: {
|
|
63
|
+
success?: ((res: {
|
|
64
|
+
content: string;
|
|
65
|
+
/** 街道信息 */
|
|
66
|
+
street?: string;
|
|
67
|
+
/** 音频model */
|
|
68
|
+
audio?: unknown;
|
|
69
|
+
/** 视频model */
|
|
70
|
+
video?: unknown;
|
|
71
|
+
/** 媒资视频 */
|
|
72
|
+
mediaVideo?: {
|
|
73
|
+
mediaId: string;
|
|
74
|
+
};
|
|
75
|
+
images: {
|
|
76
|
+
url: string;
|
|
77
|
+
width: number;
|
|
78
|
+
height: number;
|
|
79
|
+
}[] | undefined;
|
|
80
|
+
}) => void) | undefined;
|
|
81
|
+
fail?: (error: import('./bridge-code').BridgeCode) => void;
|
|
82
|
+
complete?: () => void;
|
|
83
|
+
} | undefined] | [params?: ({
|
|
84
|
+
[key: string]: any;
|
|
62
85
|
/** 文本默认显示内容(placehold) */
|
|
63
86
|
hint?: string;
|
|
64
87
|
/** 默认初始化文案 */
|
|
@@ -89,8 +112,28 @@ export declare function openPostEditor(data?: {
|
|
|
89
112
|
content_max_length?: number;
|
|
90
113
|
/** 文本最小长度 */
|
|
91
114
|
content_min_length?: number;
|
|
92
|
-
|
|
93
|
-
|
|
115
|
+
} & {
|
|
116
|
+
success?: ((res: {
|
|
117
|
+
content: string;
|
|
118
|
+
/** 街道信息 */
|
|
119
|
+
street?: string;
|
|
120
|
+
/** 音频model */
|
|
121
|
+
audio?: unknown;
|
|
122
|
+
/** 视频model */
|
|
123
|
+
video?: unknown;
|
|
124
|
+
/** 媒资视频 */
|
|
125
|
+
mediaVideo?: {
|
|
126
|
+
mediaId: string;
|
|
127
|
+
};
|
|
128
|
+
images: {
|
|
129
|
+
url: string;
|
|
130
|
+
width: number;
|
|
131
|
+
height: number;
|
|
132
|
+
}[] | undefined;
|
|
133
|
+
}) => void) | undefined;
|
|
134
|
+
fail?: (error: import('./bridge-code').BridgeCode) => void;
|
|
135
|
+
complete?: () => void;
|
|
136
|
+
}) | undefined]) => Promise<{
|
|
94
137
|
content: string;
|
|
95
138
|
/** 街道信息 */
|
|
96
139
|
street?: string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @description 上报数据埋点到个推
|
|
4
|
+
* 桥接type: 69
|
|
5
|
+
* @example **示例代码**
|
|
6
|
+
```js
|
|
7
|
+
import { reportDAEvent } from '@kbapp/js-bridge';
|
|
8
|
+
|
|
9
|
+
reportDAEvent({
|
|
10
|
+
eventName: 'event_name',
|
|
11
|
+
eventParams: {
|
|
12
|
+
test_param: 'test_value',
|
|
13
|
+
},
|
|
14
|
+
success() {
|
|
15
|
+
console.log('上报成功')
|
|
16
|
+
},
|
|
17
|
+
})
|
|
18
|
+
```
|
|
19
|
+
*/
|
|
20
|
+
export declare const reportDAEvent: (params: {
|
|
21
|
+
/** 事件名 */
|
|
22
|
+
eventName: string;
|
|
23
|
+
/** 上报值 */
|
|
24
|
+
eventParams?: {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
};
|
|
27
|
+
/** 开始结束类型传递 */
|
|
28
|
+
eventType?: "Begin" | "End";
|
|
29
|
+
} & {
|
|
30
|
+
success?: ((res: void) => void) | undefined;
|
|
31
|
+
fail?: (error: import('./bridge-code').BridgeCode) => void;
|
|
32
|
+
complete?: () => void;
|
|
33
|
+
}) => Promise<void>;
|
package/dist/lib/run-action.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
|
-
* @description
|
|
4
|
-
*
|
|
5
|
-
* **示例代码**
|
|
3
|
+
* @description 执行统一跳转页面标准
|
|
4
|
+
* 桥接type: 1001
|
|
5
|
+
* @example **示例代码**
|
|
6
6
|
```js
|
|
7
7
|
import { runAction } from '@kbapp/js-bridge';
|
|
8
8
|
|
|
@@ -14,7 +14,11 @@ runAction({
|
|
|
14
14
|
})
|
|
15
15
|
```
|
|
16
16
|
*/
|
|
17
|
-
export declare
|
|
17
|
+
export declare const runAction: (params: {
|
|
18
18
|
action: string;
|
|
19
19
|
actionParams?: Record<string, any>;
|
|
20
|
-
}
|
|
20
|
+
} & {
|
|
21
|
+
success?: ((res: void) => void) | undefined;
|
|
22
|
+
fail?: (error: import('./bridge-code').BridgeCode) => void;
|
|
23
|
+
complete?: () => void;
|
|
24
|
+
}) => Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
|
-
* @description
|
|
4
|
-
*
|
|
5
|
-
* **示例代码**
|
|
3
|
+
* @description 保存图片到本地
|
|
4
|
+
* 桥接type: 62
|
|
5
|
+
* @example **示例代码**
|
|
6
6
|
```js
|
|
7
7
|
import { saveImageToLocal } from '@kbapp/js-bridge';
|
|
8
8
|
|
|
@@ -12,7 +12,11 @@ saveImageToLocal({
|
|
|
12
12
|
```
|
|
13
13
|
*
|
|
14
14
|
*/
|
|
15
|
-
export declare const saveImageToLocal: (
|
|
15
|
+
export declare const saveImageToLocal: (params: {
|
|
16
16
|
/** 图片url(仅支持网络地址) */
|
|
17
17
|
imageUrl: string;
|
|
18
|
+
} & {
|
|
19
|
+
success?: ((res: void) => void) | undefined;
|
|
20
|
+
fail?: (error: import('./bridge-code').BridgeCode) => void;
|
|
21
|
+
complete?: () => void;
|
|
18
22
|
}) => Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
3
|
* @description 保存视频到本地. app版本要求6.90.11
|
|
4
|
-
*
|
|
5
|
-
* **示例代码**
|
|
4
|
+
* 桥接type: 63
|
|
5
|
+
* @example **示例代码**
|
|
6
6
|
```js
|
|
7
7
|
import { saveVideoToLocal } from '@kbapp/js-bridge';
|
|
8
8
|
|
|
@@ -12,7 +12,11 @@ saveVideoToLocal({
|
|
|
12
12
|
```
|
|
13
13
|
*
|
|
14
14
|
*/
|
|
15
|
-
export declare const saveVideoToLocal: (
|
|
15
|
+
export declare const saveVideoToLocal: (params: {
|
|
16
16
|
/** 视频url(仅支持网络地址) */
|
|
17
17
|
videoUrl: string;
|
|
18
|
+
} & {
|
|
19
|
+
success?: ((res: void) => void) | undefined;
|
|
20
|
+
fail?: (error: import('./bridge-code').BridgeCode) => void;
|
|
21
|
+
complete?: () => void;
|
|
18
22
|
}) => Promise<void>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @description 扫描二维码
|
|
4
|
+
* 桥接type: 26
|
|
5
|
+
* @example **示例代码**
|
|
6
|
+
```js
|
|
7
|
+
import { scanQRCode } from '@kbapp/js-bridge';
|
|
8
|
+
|
|
9
|
+
scanQRCode({
|
|
10
|
+
success(result) {
|
|
11
|
+
console.log('扫描结果', result)
|
|
12
|
+
},
|
|
13
|
+
fail(error) {
|
|
14
|
+
console.log('扫描失败', error)
|
|
15
|
+
},
|
|
16
|
+
})
|
|
17
|
+
```
|
|
18
|
+
*/
|
|
19
|
+
export declare const scanQRCode: (params?: {
|
|
20
|
+
success?: ((res: string) => void) | undefined;
|
|
21
|
+
fail?: (error: import('./bridge-code').BridgeCode) => void;
|
|
22
|
+
complete?: () => void;
|
|
23
|
+
} | undefined) => Promise<string>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @description 定义屏幕方向
|
|
4
|
+
* 桥接type: 71
|
|
5
|
+
*/
|
|
6
|
+
export declare const setScreenOrientation: (params: {
|
|
7
|
+
/** 屏幕方向. 0: 竖屏. 1: 横屏 */
|
|
8
|
+
orientation: 0 | 1;
|
|
9
|
+
} & {
|
|
10
|
+
success?: ((res: void) => void) | undefined;
|
|
11
|
+
fail?: (error: import('./bridge-code').BridgeCode) => void;
|
|
12
|
+
complete?: () => void;
|
|
13
|
+
}) => Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
3
|
* @description 设置网页标题(建议通过document.title设置), app版本要求6.90.11
|
|
4
|
-
*
|
|
5
|
-
* **示例代码**
|
|
4
|
+
* 桥接type: 64
|
|
5
|
+
* @example **示例代码**
|
|
6
6
|
```js
|
|
7
7
|
import { setWebViewTitle } from '@kbapp/js-bridge';
|
|
8
8
|
|
|
@@ -11,7 +11,11 @@ setWebViewTitle({
|
|
|
11
11
|
})
|
|
12
12
|
```
|
|
13
13
|
*/
|
|
14
|
-
export declare const setWebViewTitle: (
|
|
14
|
+
export declare const setWebViewTitle: (params: {
|
|
15
15
|
/** 网页标题 */
|
|
16
16
|
title: string;
|
|
17
|
+
} & {
|
|
18
|
+
success?: ((res: void) => void) | undefined;
|
|
19
|
+
fail?: (error: import('./bridge-code').BridgeCode) => void;
|
|
20
|
+
complete?: () => void;
|
|
17
21
|
}) => Promise<void>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @description 分享图片 app版本要求6.90.11
|
|
4
|
+
* 桥接type: 58
|
|
5
|
+
* **示例代码**
|
|
6
|
+
```js
|
|
7
|
+
import { shareImage } from '@kbapp/js-bridge';
|
|
8
|
+
|
|
9
|
+
shareImage({
|
|
10
|
+
imageUrl: 'https://static.kaiba315.com.cn/kaiba-logo.png'
|
|
11
|
+
})
|
|
12
|
+
```
|
|
13
|
+
*/
|
|
14
|
+
export declare const shareImage: (params: {
|
|
15
|
+
/** 图片(仅支持网络地址,jpg/png) */
|
|
16
|
+
imageUrl: string;
|
|
17
|
+
} & {
|
|
18
|
+
success?: ((res: void) => void) | undefined;
|
|
19
|
+
fail?: (error: import('./bridge-code').BridgeCode) => void;
|
|
20
|
+
complete?: () => void;
|
|
21
|
+
}) => Promise<void>;
|