muplogin
v1.0.18
Published
login function
Downloads
6
Maintainers
Readme
Cordova plugins login module.
Usage
1.init
// init
var host = new Object();
host.messageHost = 'https://im.ygsoft.com';
host.socketHost = 'wss://im.ygsoft.com';
cordova.plugins.MupLogin.init(
JSON.stringify(host),
function(msg) {
document
.getElementById('deviceready')
.querySelector('.received')
.innerHTML = msg;
},
function(err) {
document
.getElementById('deviceready')
.innerHTML = '<p class="event received">' + err + '</p>';
}
);
2.open login page
// open login page
cordova.plugins.MupLogin.openLoginPage(
'Plugin Ready!',
function(msg) {
},
function(err) {
}
);
3.demo
Demo at [email protected]:yanpeng3/mup-cordova-test.git
.