1.0.1 • Published 6 years ago
h5-call-native v1.0.1
H5唤起native
安装(install)
npm install h5-call-native -S
使用(use)
import h5CallNative from 'h5-call-native'
// init方法返回promise对象
h5CallNative.init(appConfig)
.then(() => {
// 成功之后回调
})
.catch(() => {
// 失败回调
})
描述(desc)
参数
@{ param } appConfig : 配置信息
const appConfig = {
// 协议头
PROTOCAL: 'ycmath',
// 主页(路由)
HOME: 'yangcong345.com/packageDetail?ladderLevel=§ionId=',
// 安卓apk相关信息
APK_INFO: {
PKG: "com.yangcong345.android.phone",
CATEGORY: "android.intent.category.DEFAULT",
ACTION: "android.intent.action.VIEW"
},
// 超时时间(超时则认为失败)
LOAD_WAITING: 3000
}