Commit 79571d4b by 朱建香

1130

parent b801c950
...@@ -13,6 +13,7 @@ iot.ready(init); ...@@ -13,6 +13,7 @@ iot.ready(init);
function init() { function init() {
//通用 dialog、loading组件 //通用 dialog、loading组件
uPublic.componentsInit(['u-dialog','u-loading','u-button']); uPublic.componentsInit(['u-dialog','u-loading','u-button']);
uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
//配置组件 //配置组件
...@@ -38,6 +39,7 @@ function init() { ...@@ -38,6 +39,7 @@ function init() {
console.log('error', err); console.log('error', err);
}); });
}else{ }else{
console.log("start login");
loginButtonTap(self); loginButtonTap(self);
} }
...@@ -100,11 +102,13 @@ function loginButtonTap(self){ ...@@ -100,11 +102,13 @@ function loginButtonTap(self){
// },(err)=>{ // },(err)=>{
// console.log(err); // console.log(err);
// }) // })
alert('login');
iot.business.sds.login({ iot.business.sds.login({
data: { data: {
userinfo: {} userinfo: {}
}, },
success: (response) => { success: (response) => {
alert("response");
console.log(response); console.log(response);
if(window.iotDebug){ if(window.iotDebug){
iotDebug.push('end: SDSloginSuccees'); iotDebug.push('end: SDSloginSuccees');
...@@ -128,12 +132,14 @@ function loginButtonTap(self){ ...@@ -128,12 +132,14 @@ function loginButtonTap(self){
}, },
error: (error) => { error: (error) => {
console.log(error); console.log(error);
alert("error");
if(window.iotDebug){ if(window.iotDebug){
iotDebug.push('end: sds登陆失败'+JSON.stringify(error)); iotDebug.push('end: sds登陆失败'+JSON.stringify(error));
} }
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot,'sds登陆失败'); iotDebug.upload(iot,'sds登陆失败');
} }
// //请求失败 // //请求失败
//// uPublic.openRequestErrorAlert(self); //// uPublic.openRequestErrorAlert(self);
}, },
......
...@@ -20,6 +20,7 @@ _public.iot.ready(init); /** ...@@ -20,6 +20,7 @@ _public.iot.ready(init); /**
function init() { function init() {
//通用 dialog、loading组件 //通用 dialog、loading组件
_public.uPublic.componentsInit(['u-dialog', 'u-loading', 'u-button']); _public.uPublic.componentsInit(['u-dialog', 'u-loading', 'u-button']);
_public.uPublic.closeSlideBack();
var app = new Vue({ var app = new Vue({
data: { data: {
//配置组件 //配置组件
...@@ -45,6 +46,7 @@ function init() { ...@@ -45,6 +46,7 @@ function init() {
console.log('error', err); console.log('error', err);
}); });
} else { } else {
console.log("start login");
loginButtonTap(self); loginButtonTap(self);
} }
...@@ -108,11 +110,13 @@ function loginButtonTap(self) { ...@@ -108,11 +110,13 @@ function loginButtonTap(self) {
// },(err)=>{ // },(err)=>{
// console.log(err); // console.log(err);
// }) // })
alert('login');
_public.iot.business.sds.login({ _public.iot.business.sds.login({
data: { data: {
userinfo: {} userinfo: {}
}, },
success: function success(response) { success: function success(response) {
alert("response");
console.log(response); console.log(response);
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.push('end: SDSloginSuccees'); iotDebug.push('end: SDSloginSuccees');
...@@ -134,12 +138,14 @@ function loginButtonTap(self) { ...@@ -134,12 +138,14 @@ function loginButtonTap(self) {
}, },
error: function error(_error) { error: function error(_error) {
console.log(_error); console.log(_error);
alert("error");
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.push('end: sds登陆失败' + JSON.stringify(_error)); iotDebug.push('end: sds登陆失败' + JSON.stringify(_error));
} }
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(_public.iot, 'sds登陆失败'); iotDebug.upload(_public.iot, 'sds登陆失败');
} }
// //请求失败 // //请求失败
//// uPublic.openRequestErrorAlert(self); //// 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