|
5#
楼主 |
发表于 2017-6-12 17:31:51
|
只看该作者
startWithAppID, userLogin 到后面的getBoundDevices 都没有发现error。
var init = function(){
var params = {
appID : window.appId
};
gizWifiSDK = api.require('gizWifiSDK');
gizWifiSDK.startWithAppID(params, function(ret, err) {
//alert("ret = " + JSON.stringify(ret) + "err = " + JSON.stringify(err));
if(ret.errorCode == 8316){
setTimeout("startWithAppIDCB();",2000);
}
});
};
var uid = "";
var token = "";
var startWithAppIDCB = function(){
var adminpwd = getAdminAndPwd();
if ( typeof (adminpwd.admin) != "undefined") {
LoginTimeOutFlag = 0;
LoginTimeOut = setTimeout(function() {
if (LoginTimeOutFlag == 0) {
bf_common_view.bf_win.popToast("Login timeout");
bf_common_view.bf_win.openWin('login','./');
setTimeout("api.removeLaunchView();", 1000);
return;
}
}, 15000);
gizWifiSDK.userLogin(jsonSetAdminAndPwd(adminpwd.admin, adminpwd.pwd), function(ret, err) {
.............. |
|