Commit f9cc342d by 朱建香

1117

parent 33797562
......@@ -292,8 +292,8 @@
"cancelAssociatedFailue": "取消关联失败",
"setHijackSuccess": "设为劫持指纹成功",
"setHijackFailue": "设为劫持指纹失败",
"cancelHijackSuccess": "设为劫持指纹成功",
"cancelHijackFailue": "设为劫持指纹失败"
"cancelHijackSuccess": "取消劫持指纹成功",
"cancelHijackFailue": "取消劫持指纹失败"
},
"addUnlockInfo":{
"opendoorMode": "选择要关联的开锁方式",
......
......@@ -314,42 +314,51 @@ function recordSelectChange(self, value) {
//tap 添加
function addButtonTap(self){
if(self.getOpenId()){
uComponents.showLoading(self);
iot.business.api.sendCustom('lock/bindOpenLog',{
data: {
device_id: self.extras.deviceId,
mode: self.getMode(),
openId: self.getOpenId(),
rel_id: self.extras.id
},
success: (response) => {
console.log(response);
if(response.data.success){
uComponents.openAlert(self, Vue.t('addUnlockInfo.addInfoSuccess'), {
iot.business.api.sendCustom('lock/bindOpenLog',{
data: {
device_id: self.extras.deviceId,
mode: self.getMode(),
openId: self.getOpenId(),
rel_id: self.extras.id
},
success: (response) => {
console.log(response);
if(response.data.success){
uComponents.openAlert(self, Vue.t('addUnlockInfo.addInfoSuccess'), {
text: Vue.t('dialog.confirm'), callback: function () {
iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{ });
iot.navigator.back();
}
});
}else{}
},
error: (error) => {
console.log(error);
// if(window.iotDebug){
// iotDebug.push('end: 绑定开门方式失败'+JSON.stringify(error));
// }
// if (window.iotDebug) {
// iotDebug.upload(iot,'绑定开门方式失败');
// }
uComponents.openAlert(vmObj, Vue.t('addUnlockInfo.addInfoFailue'), {
text: Vue.t('dialog.confirm'), callback: function () {
iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{ });
iot.navigator.back();
}
});
}else{}
},
error: (error) => {
console.log(error);
// if(window.iotDebug){
// iotDebug.push('end: 绑定开门方式失败'+JSON.stringify(error));
// }
// if (window.iotDebug) {
// iotDebug.upload(iot,'绑定开门方式失败');
// }
},
complete: () => {
uComponents.hideLoading(self);
}
});
setTimeout(function(){
uComponents.openAlert(vmObj, Vue.t('addUnlockInfo.addInfoFailue'), {
text: Vue.t('dialog.confirm'), callback: function () {
}
});
},
complete: () => {
uComponents.hideLoading(self);
}
});
uComponents.hideLoading(self);
},config.wifi_add_timeout);
}
}
function selectOpenDoorModeTap(self, index){
......
......@@ -360,6 +360,7 @@ function unbindButtonTap(self){
success: (response) => {
console.log(response);
self.setStateShowFlag(true);
getUserInfo(self);
},
error: (error) => {
console.log(error);
......
......@@ -17106,41 +17106,49 @@ function recordSelectChange(self, value) {
//tap 添加
function addButtonTap(self) {
_public.uComponents.showLoading(self);
_public.iot.business.api.sendCustom('lock/bindOpenLog', {
data: {
device_id: self.extras.deviceId,
mode: self.getMode(),
openId: self.getOpenId(),
rel_id: self.extras.id
},
success: function success(response) {
console.log(response);
if (response.data.success) {
_public.uComponents.openAlert(self, Vue.t('addUnlockInfo.addInfoSuccess'), {
text: Vue.t('dialog.confirm'), callback: function callback() {
_public.iot.navigator.fire(plus.webview.currentWebview().opener(), 'returnPage', {});
_public.iot.navigator.back();
}
if (self.getOpenId()) {
_public.uComponents.showLoading(self);
_public.iot.business.api.sendCustom('lock/bindOpenLog', {
data: {
device_id: self.extras.deviceId,
mode: self.getMode(),
openId: self.getOpenId(),
rel_id: self.extras.id
},
success: function success(response) {
console.log(response);
if (response.data.success) {
_public.uComponents.openAlert(self, Vue.t('addUnlockInfo.addInfoSuccess'), {
text: Vue.t('dialog.confirm'), callback: function callback() {
_public.iot.navigator.fire(plus.webview.currentWebview().opener(), 'returnPage', {});
_public.iot.navigator.back();
}
});
} else {}
},
error: function error(_error) {
console.log(_error);
// if(window.iotDebug){
// iotDebug.push('end: 绑定开门方式失败'+JSON.stringify(error));
// }
// if (window.iotDebug) {
// iotDebug.upload(iot,'绑定开门方式失败');
// }
_public.uComponents.openAlert(vmObj, Vue.t('addUnlockInfo.addInfoFailue'), {
text: Vue.t('dialog.confirm'), callback: function callback() {}
});
} else {}
},
error: function error(_error) {
console.log(_error);
// if(window.iotDebug){
// iotDebug.push('end: 绑定开门方式失败'+JSON.stringify(error));
// }
// if (window.iotDebug) {
// iotDebug.upload(iot,'绑定开门方式失败');
// }
},
complete: function complete() {
_public.uComponents.hideLoading(self);
}
});
setTimeout(function () {
_public.uComponents.openAlert(vmObj, Vue.t('addUnlockInfo.addInfoFailue'), {
text: Vue.t('dialog.confirm'), callback: function callback() {}
});
},
complete: function complete() {
_public.uComponents.hideLoading(self);
}
});
}, _config2.default.wifi_add_timeout);
}
}
function selectOpenDoorModeTap(self, index) {
......
......@@ -1208,6 +1208,7 @@ function unbindButtonTap(self) {
success: function success(response) {
console.log(response);
self.setStateShowFlag(true);
getUserInfo(self);
},
error: function error(_error2) {
console.log(_error2);
......
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