coreh5sdk-test
v0.0.4
Published
核心sdk-测试
Downloads
3
Readme
核心sdk js功能介绍
1. 核心平台通过js引入信息传递
渠道引入方式:
yarn add coresdk
import coresdk from 'coreh5sdk-test/dist/coreH5sdk'
Vue.prototype.$coresdk = new coresdk({})
2. api介绍
(1)登陆回调
const loginData = {
externalData: {
openId: parseInt(Math.random() * 10000000000000000)
},
internalData: {
token: '4a3b62078b47a1eea21d4f5dada68516',
register: true,
floatMsg: '我是卷轴',
floatUrl: location.origin + '/textScroll',
redPoint: true
}
}
this.$coresdk.callNative.loginSuccess(loginData)
(2)支付回调
this.$coresdk.callNative.transactionSuccess({
status: true,
amount: 100,
orderId: '2345678765435678',
paymentType: 'alipay'
})
(3)调用客户端的方法:
this.$coresdk.callNative[methods]()
methods:是以下的方法 ======>
详细客户端方法列表:http://gitlab.yslocal.com/fe/demo/dsbridge