vk-appbridge
v1.3.2
Published
### 安装: npm install bridge --save
Downloads
5
Readme
JS SDK to call VIPKID APP's interface.
安装:
npm install bridge --save
使用:
1、可以按需引入 import {videoPlay, phoneCall} from 'appbridge'
//for example
videoPlay()
.then(res=>{
//TO DO
})
.catch(err=>{
})
2、也可以全量引入 import * as Appbridge from 'appbridge'
//for example
Appbridge.videoPlay()
.then(res=>{
//TO DO
})
.catch(err=>{
})
已经支持的API
appBack: vkappbridge://history/back
,
showToast: vkappbridge://toast/show
,
phoneCall: vkappbridge://phone/call
,
applyPermission: vkappbridge://apply/permission
,
getNetworkType: vkappbridge://net/gettype
,
videoPlay: vkappbridge://video/play
,
userLogout: vkappbridge://user/logout
,
shareInfo: vkappbridge://share/info
,
payPingpp: vkappbridge://pay/pingpp
,
payIntercept: vkappbridge://pay/intercept
,
tabbarVisibility: vkappbridge://app.tabbar/visibility
,
webLoadReady: vkappbridge://web/is_load_ready
,
newWebview: vkappbridge://app/openURL
,
trackClick: vkappbridge://track/click
,
trackTrigger: vkappbridge://track/trigger
,
trackPageview: vkappbridge://track/pageview
,
androidUpgradeToast: vkappbridge://upgrade/showTips
,
applyScheme: vkappbridge://apply/scheme
,
openScheme: vkappbridge://apply/openScheme
,
gotoUrl: vkparent://${url}