Commit 3d86c336 by 朱建香

10122023

parent 86aa7ed4
...@@ -74,8 +74,9 @@ function loginButtonTap(self){ ...@@ -74,8 +74,9 @@ function loginButtonTap(self){
console.log(response); console.log(response);
let data = uPublic.checkResponseData(response.data); let data = uPublic.checkResponseData(response.data);
if(data){ if(data){
console.log("云端登陆"); if(data.hasOwnProperty('UserID')){
cloudsLogin(self, data.UserID); cloudsLogin(self, data.UserID);
}
// iot.navigator.openWindow({ // iot.navigator.openWindow({
// url: '../device/index.html', // url: '../device/index.html',
// id: 'device' // id: 'device'
...@@ -87,9 +88,11 @@ function loginButtonTap(self){ ...@@ -87,9 +88,11 @@ function loginButtonTap(self){
error: (error) => { error: (error) => {
console.log(error); console.log(error);
//请求失败 //请求失败
uPublic.openRequestErrorAlert(self); // uPublic.openRequestErrorAlert(self);
}, },
complete: () => {} complete: () => {
uComponents.hideLoading(self);
}
}); });
}, },
error: (error) => { error: (error) => {
......
...@@ -45,7 +45,7 @@ function init() { ...@@ -45,7 +45,7 @@ function init() {
let data = uPublic.checkResponseData(response.data); let data = uPublic.checkResponseData(response.data);
if(data){ if(data){
iot.navigator.openWindow({ iot.navigator.openWindow({
url: '../device/', url: '../device/index.html',
id: 'device' id: 'device'
}); });
}else{ }else{
...@@ -148,7 +148,7 @@ function passwordChange(self,text){ ...@@ -148,7 +148,7 @@ function passwordChange(self,text){
//tap 登录 //tap 登录
function loginButtonTap(){ function loginButtonTap(){
iot.navigator.openWindow({ iot.navigator.openWindow({
url: '../device/', url: '../device/index.html',
id: 'device' id: 'device'
}); });
} }
......
...@@ -124,7 +124,7 @@ function logoutButtonTap(self){ ...@@ -124,7 +124,7 @@ function logoutButtonTap(self){
console.log(error); console.log(error);
}); });
iot.navigator.openWindow({ iot.navigator.openWindow({
url: '../login/', url: '../login/index.html',
id: 'login' id: 'login'
}); });
let wvs = plus.webview.all(); let wvs = plus.webview.all();
......
...@@ -82,8 +82,9 @@ function loginButtonTap(self) { ...@@ -82,8 +82,9 @@ function loginButtonTap(self) {
console.log(response); console.log(response);
var data = _public.uPublic.checkResponseData(response.data); var data = _public.uPublic.checkResponseData(response.data);
if (data) { if (data) {
console.log("云端登陆"); if (data.hasOwnProperty('UserID')) {
cloudsLogin(self, data.UserID); cloudsLogin(self, data.UserID);
}
// iot.navigator.openWindow({ // iot.navigator.openWindow({
// url: '../device/index.html', // url: '../device/index.html',
// id: 'device' // id: 'device'
...@@ -93,9 +94,11 @@ function loginButtonTap(self) { ...@@ -93,9 +94,11 @@ function loginButtonTap(self) {
error: function error(_error) { error: function error(_error) {
console.log(_error); console.log(_error);
//请求失败 //请求失败
_public.uPublic.openRequestErrorAlert(self); // uPublic.openRequestErrorAlert(self);
}, },
complete: function complete() {} complete: function complete() {
_public.uComponents.hideLoading(self);
}
}); });
}, },
error: function error(_error2) { error: function error(_error2) {
......
...@@ -52,7 +52,7 @@ function init() { ...@@ -52,7 +52,7 @@ function init() {
var data = _public.uPublic.checkResponseData(response.data); var data = _public.uPublic.checkResponseData(response.data);
if (data) { if (data) {
_public.iot.navigator.openWindow({ _public.iot.navigator.openWindow({
url: '../device/', url: '../device/index.html',
id: 'device' id: 'device'
}); });
} else {} } else {}
...@@ -153,7 +153,7 @@ function passwordChange(self, text) { ...@@ -153,7 +153,7 @@ function passwordChange(self, text) {
//tap 登录 //tap 登录
function loginButtonTap() { function loginButtonTap() {
_public.iot.navigator.openWindow({ _public.iot.navigator.openWindow({
url: '../device/', url: '../device/index.html',
id: 'device' id: 'device'
}); });
} }
......
...@@ -130,7 +130,7 @@ function logoutButtonTap(self) { ...@@ -130,7 +130,7 @@ function logoutButtonTap(self) {
console.log(error); console.log(error);
}); });
_public.iot.navigator.openWindow({ _public.iot.navigator.openWindow({
url: '../login/', url: '../login/index.html',
id: 'login' id: 'login'
}); });
var wvs = plus.webview.all(); var wvs = plus.webview.all();
......
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