Commit d2587701 by wjd

Merge branch 'jianxiang' into 'test/96'

Jianxiang

See merge request iot-project-js/doorlock!35
parents 4883c0ef ef8c3132
......@@ -134,6 +134,7 @@ function resolve(self){
function passwordChange(self,text){
self.setTextPassword(text);
console.log('passwordChange: ' + self.getTextPassword());
self.setTextErrorTip('');
}
//重新mui.back
......@@ -153,7 +154,7 @@ function connectButtonTap(self){
self.setTextErrorTip(Vue.t('wifiAdd.unbindWifiTip'));
}else if(self.getTextPassword() == null || self.getTextPassword().trim() == ''){
self.setTextErrorTip(Vue.t('wifiAdd.passwordInputTip'));
}else{
}else if(self.getTextErrorTip() == ''){
self.countDownText = config.add_wifi_timeout;
window.clearInterval(self.timeout);
self.timeout = setInterval(() => {
......@@ -218,17 +219,7 @@ function connectButtonTap(self){
iotDebug.upload(iot,'配网成功');
}
//wifi连接成功,停止连接wifi
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) => {}
});
}
}]);
uComponents.showProcess(self, 0, Vue.t('wifiAdd.wifiBindSuccess'));
}
},
error: (error) => {
......@@ -259,17 +250,7 @@ function connectButtonTap(self){
if (window.iotDebug) {
iotDebug.upload(iot,'激活中');
}
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) => {}
});
}
}]);
uComponents.showProcess(self, 0, Vue.t('wifiAdd.deviceActivating'));
}else if(response.data == "joined success"){
if(window.iotDebug){
iotDebug.push('end: 激活成功'+JSON.stringify(response));
......
......@@ -1235,7 +1235,9 @@ function confirmButtonTap(self){
if(self.boolPasswordMinlength){
if(self.getTextPassword() == null || self.getTextPassword().trim() == ''){
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);
setRemoteOpenDoorLoading(self, 0, Vue.t('remoteOpendoor.loading'));
let keyIv = crypto.enkey(self.mac.replace(/:/g,''));
......@@ -1281,11 +1283,12 @@ function confirmButtonTap(self){
}
},config.remote_opendoor_timeout);
}else{
uComponents.openAlert(self, Vue.t('remoteOpendoor.textlengthTip'), {
text: Vue.t('dialog.confirm'), callback: function () {
}
});
self.setTextErrorTip(Vue.t('remoteOpendoor.textlengthTip'));
// uComponents.openAlert(self, Vue.t('remoteOpendoor.textlengthTip'), {
// text: Vue.t('dialog.confirm'), callback: function () {
//
// }
// });
}
}else{
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