Commit 79571d4b by 朱建香

1130

parent b801c950
......@@ -13,6 +13,7 @@ iot.ready(init);
function init() {
//通用 dialog、loading组件
uPublic.componentsInit(['u-dialog','u-loading','u-button']);
uPublic.closeSlideBack();
const app = new Vue({
data:{
//配置组件
......@@ -38,6 +39,7 @@ function init() {
console.log('error', err);
});
}else{
console.log("start login");
loginButtonTap(self);
}
......@@ -100,11 +102,13 @@ function loginButtonTap(self){
// },(err)=>{
// console.log(err);
// })
alert('login');
iot.business.sds.login({
data: {
userinfo: {}
},
success: (response) => {
alert("response");
console.log(response);
if(window.iotDebug){
iotDebug.push('end: SDSloginSuccees');
......@@ -128,12 +132,14 @@ function loginButtonTap(self){
},
error: (error) => {
console.log(error);
alert("error");
if(window.iotDebug){
iotDebug.push('end: sds登陆失败'+JSON.stringify(error));
}
if (window.iotDebug) {
iotDebug.upload(iot,'sds登陆失败');
}
// //请求失败
//// uPublic.openRequestErrorAlert(self);
},
......
......@@ -20,6 +20,7 @@ _public.iot.ready(init); /**
function init() {
//通用 dialog、loading组件
_public.uPublic.componentsInit(['u-dialog', 'u-loading', 'u-button']);
_public.uPublic.closeSlideBack();
var app = new Vue({
data: {
//配置组件
......@@ -45,6 +46,7 @@ function init() {
console.log('error', err);
});
} else {
console.log("start login");
loginButtonTap(self);
}
......@@ -108,11 +110,13 @@ function loginButtonTap(self) {
// },(err)=>{
// console.log(err);
// })
alert('login');
_public.iot.business.sds.login({
data: {
userinfo: {}
},
success: function success(response) {
alert("response");
console.log(response);
if (window.iotDebug) {
iotDebug.push('end: SDSloginSuccees');
......@@ -134,12 +138,14 @@ function loginButtonTap(self) {
},
error: function error(_error) {
console.log(_error);
alert("error");
if (window.iotDebug) {
iotDebug.push('end: sds登陆失败' + JSON.stringify(_error));
}
if (window.iotDebug) {
iotDebug.upload(_public.iot, 'sds登陆失败');
}
// //请求失败
//// uPublic.openRequestErrorAlert(self);
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment