Commit ef8c3132 by 朱建香

#31绑定成功之后取消按钮消失

parent 9c657e81
...@@ -219,17 +219,7 @@ function connectButtonTap(self){ ...@@ -219,17 +219,7 @@ function connectButtonTap(self){
iotDebug.upload(iot,'配网成功'); iotDebug.upload(iot,'配网成功');
} }
//wifi连接成功,停止连接wifi //wifi连接成功,停止连接wifi
uComponents.showProcess(self, 0, Vue.t('wifiAdd.wifiBindSuccess'), [{ uComponents.showProcess(self, 0, Vue.t('wifiAdd.wifiBindSuccess'));
"class": 'custom-process-button custom-process-cancelButton', 'text': Vue.t('btn.cancel'), 'callback': () => {
uComponents.hideProcess(self);
window.clearInterval(self.timeout);
//停止配网
iot.business.sds.stopFindDevices({
success: (response) => {},
error: (error) => {}
});
}
}]);
} }
}, },
error: (error) => { error: (error) => {
...@@ -260,17 +250,7 @@ function connectButtonTap(self){ ...@@ -260,17 +250,7 @@ function connectButtonTap(self){
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot,'激活中'); iotDebug.upload(iot,'激活中');
} }
uComponents.showProcess(self, 0, Vue.t('wifiAdd.deviceActivating'), [{ uComponents.showProcess(self, 0, Vue.t('wifiAdd.deviceActivating'));
"class": 'custom-process-button custom-process-cancelButton', 'text': Vue.t('btn.cancel'), 'callback': () => {
uComponents.hideProcess(self);
window.clearInterval(self.timeout);
//停止配网
iot.business.sds.stopFindDevices({
success: (response) => {},
error: (error) => {}
});
}
}]);
}else if(response.data == "joined success"){ }else if(response.data == "joined success"){
if(window.iotDebug){ if(window.iotDebug){
iotDebug.push('end: 激活成功'+JSON.stringify(response)); iotDebug.push('end: 激活成功'+JSON.stringify(response));
......
...@@ -1235,7 +1235,9 @@ function confirmButtonTap(self){ ...@@ -1235,7 +1235,9 @@ function confirmButtonTap(self){
if(self.boolPasswordMinlength){ if(self.boolPasswordMinlength){
if(self.getTextPassword() == null || self.getTextPassword().trim() == ''){ if(self.getTextPassword() == null || self.getTextPassword().trim() == ''){
self.setTextErrorTip(Vue.t('remoteOpendoor.error.noPasswordTip')); self.setTextErrorTip(Vue.t('remoteOpendoor.error.noPasswordTip'));
}else{ }else if(uPublic.checkString(self.getTextPassword())){
self.setTextErrorTip(Vue.t('remoteOpendoor.textlengthTip'));
}else if(self.textErrorTip == ''){
uComponents.showCommLoading(self); uComponents.showCommLoading(self);
setRemoteOpenDoorLoading(self, 0, Vue.t('remoteOpendoor.loading')); setRemoteOpenDoorLoading(self, 0, Vue.t('remoteOpendoor.loading'));
let keyIv = crypto.enkey(self.mac.replace(/:/g,'')); let keyIv = crypto.enkey(self.mac.replace(/:/g,''));
...@@ -1281,11 +1283,12 @@ function confirmButtonTap(self){ ...@@ -1281,11 +1283,12 @@ function confirmButtonTap(self){
} }
},config.remote_opendoor_timeout); },config.remote_opendoor_timeout);
}else{ }else{
uComponents.openAlert(self, Vue.t('remoteOpendoor.textlengthTip'), { self.setTextErrorTip(Vue.t('remoteOpendoor.textlengthTip'));
text: Vue.t('dialog.confirm'), callback: function () { // uComponents.openAlert(self, Vue.t('remoteOpendoor.textlengthTip'), {
// text: Vue.t('dialog.confirm'), callback: function () {
} //
}); // }
// });
} }
}else{ }else{
uComponents.openAlert(self, Vue.t('remoteOpendoor.offlineTip'), { uComponents.openAlert(self, Vue.t('remoteOpendoor.offlineTip'), {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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