0.0.4 • Published 4 years ago

coreh5sdk-test v0.0.4

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

核心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

0.0.3

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago