H5JSSDK
html5 javascript sdk, can use advanced syntax and support low version browser
USE
npm
$ npm install H5JSSDK --save
import H5JSSDK from 'H5JSSDK';
const h5JSSDK = new H5JSSDK();
const loginCls = h5JSSDK.login({
success({ account, password }) {
alert(`${account} login success,password is ${password}`);
h5JSSDK.close(loginCls);
},
fail(msg) {
alert(msg);
}
});
browser
<script src="xxx/lib/index.js"></script>
var h5JSSDK = new H5JSSDK();
var loginCls = h5JSSDK.login({
success: function(user) {
alert(user.account + 'login success,password is' + user.password);
h5JSSDK.close(loginCls);
},
fail: function(msg) {
alert(msg);
}
});
Login
...
Pay
...