@kbapp/js-bridge 0.2.0-alpha.0 → 0.2.1-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/README.MD CHANGED
@@ -56,9 +56,9 @@ saveImageToLocal({
56
56
 
57
57
  #### 请求参数
58
58
 
59
- | 参数 | 值类型 | 说明 |
60
- | -------- | ------ | ------------ |
61
- | videoUrl | string | 视频网络地址 |
59
+ | 参数 | 值类型 | 必填? | 说明 |
60
+ | -------- | ------ | ----- | ------------ |
61
+ | videoUrl | string | 必填 | 视频网络地址 |
62
62
 
63
63
  #### 返回值
64
64
 
@@ -72,12 +72,28 @@ saveImageToLocal({
72
72
 
73
73
  #### 请求参数
74
74
 
75
- | 参数 | 值类型 | 说明 |
76
- | -------- | ------ | ------------------ |
77
- | title | string | 分享的标题 |
78
- | content | string | 分享的内容(副标题) |
79
- | url | string | 分享的网页链接 |
80
- | imageUrl | string | 分享的图片 |
75
+ | 参数 | 值类型 | 必填? | 说明 |
76
+ | -------- | ------ | ----- | ------------------ |
77
+ | title | string | 必填 | 分享的标题 |
78
+ | content | string | 必填 | 分享的内容(副标题) |
79
+ | url | string | 必填 | 分享的网页链接 |
80
+ | imageUrl | string | 必填 | 分享的图片 |
81
+
82
+ #### 返回值
83
+
84
+
85
+
86
+ ---
87
+
88
+ ### sharePoster
89
+
90
+ > 分享图片
91
+
92
+ #### 请求参数
93
+
94
+ | 参数 | 值类型 | 必填? | 说明 |
95
+ | -------- | ------ | ----- | ------------------------------------- |
96
+ | imageUrl | string | 必填 | 分享的图片链接,仅支持网络地址,png/jpg |
81
97
 
82
98
  #### 返回值
83
99
 
package/dist/index.d.ts CHANGED
@@ -65,3 +65,19 @@ export declare function saveVideoToLocal(data: {
65
65
  /** 视频url(仅支持网络地址) */
66
66
  videoUrl: string;
67
67
  }): void;
68
+ /**
69
+ *
70
+ * @description 分享海报
71
+ * **示例代码**
72
+ ```js
73
+ import { sharePoster } from '@kbapp/js-bridge';
74
+
75
+ sharePoster({
76
+ imageUrl: 'https://static.kaiba315.com.cn/kaiba-logo.png'
77
+ })
78
+ ```
79
+ */
80
+ export declare function sharePoster(data: {
81
+ /** 图片(仅支持网络地址,jpg/png) */
82
+ imageUrl: string;
83
+ }): void;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.saveVideoToLocal = exports.saveImageToLocal = exports.invokeMoreShareModal = void 0;
3
+ exports.sharePoster = exports.saveVideoToLocal = exports.saveImageToLocal = exports.invokeMoreShareModal = void 0;
4
4
  var core_1 = require("./core");
5
5
  /**
6
6
  *
@@ -81,3 +81,25 @@ function saveVideoToLocal(data) {
81
81
  });
82
82
  }
83
83
  exports.saveVideoToLocal = saveVideoToLocal;
84
+ /**
85
+ *
86
+ * @description 分享海报
87
+ * **示例代码**
88
+ ```js
89
+ import { sharePoster } from '@kbapp/js-bridge';
90
+
91
+ sharePoster({
92
+ imageUrl: 'https://static.kaiba315.com.cn/kaiba-logo.png'
93
+ })
94
+ ```
95
+ */
96
+ function sharePoster(data) {
97
+ (0, core_1.callHandler)({
98
+ name: 'OpenActRequest',
99
+ params: {
100
+ type: 58,
101
+ data: data,
102
+ },
103
+ });
104
+ }
105
+ exports.sharePoster = sharePoster;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.2.0-alpha.0",
6
+ "version": "0.2.1-alpha.0",
7
7
  "description": "开吧客户端桥接",
8
8
  "main": "./dist/index.js",
9
9
  "author": "along"