Commit d8d8d909 by 朱建香

1012

parent a6ab7446
......@@ -158,7 +158,7 @@ function connectButtonTap(self){
}else{
iot.business.sds.findWifi({
data: {
model: 'THM_LIVING_ELECTRICALBLANKET_TH_1507',
model: 'UGEN_LIVING_ELECTRICALBLANKET_THM_BL',
ssid: self.getTextWiFiName(),
wifiPwd: self.getTextPassword(),
timeout: 20000
......
......@@ -63,19 +63,19 @@ function backTap(){
//tap 开始配置Wi-Fi
function wifiAddButtonTap(){
// iot.navigator.openWindow({
// url: './wifiAdd.html',
// id: 'wifiAdd'
// });
iot.navigator.openWindow({
url: './wifiAdd.html',
id: 'wifiAdd'
});
console.log("in");
iot.business.sds.wifiDeviceConfig({
success: function (response) {
console.log('wifiDeviceConfig success');
console.log(response);
},
error: function (error) {
console.log('wifiDeviceConfig error');
console.log(error);
}
});
// iot.business.sds.wifiDeviceConfig({
// success: function (response) {
// console.log('wifiDeviceConfig success');
// console.log(response);
// },
// error: function (error) {
// console.log('wifiDeviceConfig error');
// console.log(error);
// }
// });
}
\ No newline at end of file
......@@ -460,6 +460,7 @@ function doorlockManageTap(self){
url: '../doorlockManage/',
id: 'doorlockManage',
extras: {
deviceId: self.deviceId,
uuid: self.getUuid()
}
});
......@@ -481,7 +482,7 @@ function opendoorRecordTap(self){
//tap 安全报警
function securityAlarmTap(self){
if(self.getValueSecurityAlarm == 1){
if(self.getValueSecurityAlarm() == 1){
iot.navigator.openWindow({
url: './alarmInfo.html',
id: 'alarmInfo',
......@@ -504,7 +505,7 @@ function doorlockUserTap(){
//tap 远程开门
function remoteOpendoorTap(self){
if(self.getValueRemoteOpendoor == 1){
if(self.getValueRemoteOpendoor() == 1){
iot.navigator.openWindow({
url: './remoteOpendoor.html',
id: 'remoteOpendoor',
......@@ -517,7 +518,7 @@ function remoteOpendoorTap(self){
//tap 劫持报警
function hijackAlarmTap(self){
if(self.setValueHijackAlarm == 1){
if(self.setValueHijackAlarm() == 1){
iot.navigator.openWindow({
url: './hijackRecord.html',
id: 'hijackRecord',
......
......@@ -118,13 +118,14 @@ function initComponentsConfig() {
function getDoorlockInfo(self){
uComponents.showLoading(self);
iot.business.device.getList({
iot.business.api.send('device/getList',{
data: {
sds: false,
device_id: self.extras.deviceId,
product_id: 2,
parent_id: 0,
start_id: 0,
number: 1
number: 10
},
success: (response) => {
console.log(response);
......@@ -143,7 +144,7 @@ function getDoorlockInfo(self){
complete: () => {
uComponents.hideLoading(self);
}
});
},true);
}
//tap <
......@@ -157,7 +158,7 @@ function editNameTap(self){
url: './editName.html',
id: 'editName',
extras: {
deviceId: self.getDoorlock().device_id,
deviceId: self.getDoorlock().id,
nickname: self.getTextNickname()
}
});
......@@ -165,55 +166,61 @@ function editNameTap(self){
//tap 解绑门锁
function unbindDoorlockButtonTap(self){
uComponents.openConfirm(self, Vue.t('doorlockUser.unbindDialogTip'),
{text: Vue.t('dialog.cancel'), callback: function () {}},
{text: Vue.t('dialog.unbind'), callback: function () {
uComponents.showLoading(self);
iot.business.device.unbind({
data: {
sds: true,
uuid: self.extras.uuid
},
success: (response) => {
console.log(response);
//云端解绑
uComponents.openConfirm(self, Vue.t('doorlockUser.unbindDialogTip'),
{text: Vue.t('dialog.cancel'), callback: function () {}},
{text: Vue.t('dialog.unbind'), callback: function () {
// uComponents.showLoading(self);
// //云端解绑
// iot.business.device.unbind({
// data: {
// device_id: self.getDoorlock().id
// },
// success: (response) => {
// console.log(response);
iot.business.device.unbind({
data: {
device_id: self.getDoorlock().device_id
},
data: {
sds: true,
uuid: self.extras.uuid,
device_id: self.getDoorlock().id
},
success: (response) => {
console.log(response);
self.setStateShowFlag(true);
self.setShowMsg(Vue.t('doorlockUser.unbindSuccess'));
self.setUnbindSucceess(true);
},
},
error: (error) => {
console.log(error);
self.setStateShowFlag(true);
self.setShowMsg(Vue.t('doorlockUser.unbindFailue'));
self.setUnbindSucceess(false);
self.setStateShowFlag(false);
self.setShowMsg(Vue.t('doorlockUser.unbindFailue'));
self.setUnbindSucceess(false);
},
complete: () => {
uComponents.hideLoading(self);
uComponents.hideLoading(self);
}
});
},
error: (error) => {
console.log(error);
self.setStateShowFlag(true);
self.setShowMsg(Vue.t('doorlockUser.unbindFailue'));
self.setUnbindSucceess(false);
},
complete: () => {
uComponents.hideLoading(self);
}
});
}}
);
// },
// error: (error) => {
// console.log(error);
// self.setStateShowFlag(true);
// self.setShowMsg(Vue.t('doorlockUser.unbindFailue'));
// self.setUnbindSucceess(false);
// },
// complete: () => {
// uComponents.hideLoading(self);
// }
// });
}}
);
}
//tap 隐藏提示框
function unbindStateDialogTap(self){
self.setStateShowFlag(false);
if(self.getUnbindSucceess){
iot.navigator.openWindow({
url: '../device/',
id: 'device'
});
}
}
......@@ -74,6 +74,7 @@ function loginButtonTap(self){
console.log(response);
let data = uPublic.checkResponseData(response.data);
if(data){
console.log("云端登陆");
cloudsLogin(self, data.UserID);
// iot.navigator.openWindow({
// url: '../device/',
......
......@@ -118,6 +118,11 @@ function logoutButtonTap(self){
sds: true
},
success: (response) => {
iot.business.websql.delMaps(['utoken', 'userinfo'], (response) => {
console.log(response);
}, (error) => {
console.log(error);
});
iot.navigator.openWindow({
url: '../login/',
id: 'login'
......
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