@kbapp/js-bridge 0.3.2-alpha.0 → 0.3.4-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.
Files changed (2) hide show
  1. package/README.MD +6 -4
  2. package/package.json +3 -2
package/README.MD CHANGED
@@ -266,7 +266,7 @@ if (await canIUse('sharePoster')) {
266
266
 
267
267
  ### getAppLoginInfo
268
268
 
269
- > 获取app登录信息.如果未登录返回 null
269
+ > 获取 app 登录信息.如果未登录返回 null
270
270
 
271
271
  #### 请求参数
272
272
 
@@ -302,7 +302,7 @@ Promise<{
302
302
 
303
303
  ### triggerAppLogin
304
304
 
305
- > 触发登录.如果未登录,将会唤起登录弹窗,已登录则返回登录信息
305
+ > 唤起app登录. 如果已登录,将直接返回登录信息
306
306
 
307
307
  #### 请求参数
308
308
 
@@ -347,21 +347,22 @@ Promise<{
347
347
  ```
348
348
 
349
349
  #### 返回值
350
+
350
351
  ```js
351
352
  // 返回函数,调用该函数,停止监听
352
353
  () => void
353
354
  ```
354
355
 
355
356
  #### 示例代码
357
+
356
358
  ```js
357
- import { watchAppLoginSuccess } from '@kbapp/js-bridge';
359
+ import { watchAppLoginSuccess } from '@kbapp/js-bridge'
358
360
 
359
361
  const handle = watchAppLoginSuccess(() => {
360
362
  console.log('登录成功')
361
363
  })
362
364
 
363
365
  // handle() 停止监听
364
-
365
366
  ```
366
367
 
367
368
  ---
@@ -375,6 +376,7 @@ const handle = watchAppLoginSuccess(() => {
375
376
  | key | value | 说明 |
376
377
  | ------------------- | ----- | ------------------------------------------------------ |
377
378
  | UNSUPPORTED_VERSION | 1001 | 用户当前 app 版本不支持该 桥接(此时请引导用户升级 app) |
379
+ | UN_LOGIN | 1002 | APP 未登录 |
378
380
 
379
381
  ## 常见问题
380
382
 
package/package.json CHANGED
@@ -3,8 +3,9 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.3.2-alpha.0",
6
+ "version": "0.3.4-alpha.0",
7
7
  "description": "开吧客户端桥接",
8
8
  "main": "./dist/index.js",
9
- "author": "along"
9
+ "author": "along",
10
+ "gitHead": "30e2b8314727020101c27a63f10379b6dc8b70de"
10
11
  }