|
@@ -234,6 +234,10 @@
|
|
|
* 查询绑定的空调
|
|
* 查询绑定的空调
|
|
|
*/
|
|
*/
|
|
|
async select_banding_airs() {
|
|
async select_banding_airs() {
|
|
|
|
|
+ uni.showLoading({
|
|
|
|
|
+ title: '加载绑定的空调'
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
const res = await this.$myRequest({
|
|
const res = await this.$myRequest({
|
|
|
host: this.ceshi,
|
|
host: this.ceshi,
|
|
|
url: '/airManage/usersqueryAir.action',
|
|
url: '/airManage/usersqueryAir.action',
|
|
@@ -289,9 +293,10 @@
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
if (this.airs.length > 0) {
|
|
if (this.airs.length > 0) {
|
|
|
// 显示添加的空调列表
|
|
// 显示添加的空调列表
|
|
|
- _this.isList = true
|
|
|
|
|
|
|
+ _this.isList = true;
|
|
|
|
|
+ uni.hideLoading();
|
|
|
}
|
|
}
|
|
|
- }, 300)
|
|
|
|
|
|
|
+ }, 500);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
// 隐藏添加的空调列表
|
|
// 隐藏添加的空调列表
|
|
@@ -714,9 +719,13 @@
|
|
|
if (typeof(res.data) === 'undefined') {
|
|
if (typeof(res.data) === 'undefined') {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '请求超时!',
|
|
title: '请求超时!',
|
|
|
- duration: 3000
|
|
|
|
|
|
|
+ duration: 3000,
|
|
|
|
|
+ success() {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ uni.hideLoading();
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
- uni.hideLoading();
|
|
|
|
|
} else {
|
|
} else {
|
|
|
// console.log(res.data)
|
|
// console.log(res.data)
|
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
@@ -725,9 +734,13 @@
|
|
|
this.airs[index].time = '未启动'
|
|
this.airs[index].time = '未启动'
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '关闭成功!',
|
|
title: '关闭成功!',
|
|
|
- duration: 2000
|
|
|
|
|
|
|
+ duration: 2000,
|
|
|
|
|
+ success() {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ uni.hideLoading();
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
- uni.hideLoading();
|
|
|
|
|
} else {
|
|
} else {
|
|
|
if (res.data.message == '该订单已结算,请勿重复结算') {
|
|
if (res.data.message == '该订单已结算,请勿重复结算') {
|
|
|
// 显示已经关闭图标
|
|
// 显示已经关闭图标
|
|
@@ -736,9 +749,13 @@
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
icon: 'none',
|
|
|
title: res.data.message,
|
|
title: res.data.message,
|
|
|
- duration: 3000
|
|
|
|
|
|
|
+ duration: 3000,
|
|
|
|
|
+ success() {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ uni.hideLoading();
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
- uni.hideLoading();
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -779,9 +796,13 @@
|
|
|
if (typeof(res.data) === 'undefined') {
|
|
if (typeof(res.data) === 'undefined') {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '请求超时!',
|
|
title: '请求超时!',
|
|
|
- duration: 3000
|
|
|
|
|
|
|
+ duration: 3000,
|
|
|
|
|
+ success() {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ uni.hideLoading();
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
- uni.hideLoading();
|
|
|
|
|
} else {
|
|
} else {
|
|
|
// console.log(res.data);
|
|
// console.log(res.data);
|
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
@@ -795,16 +816,22 @@
|
|
|
// 将开启按钮变成关闭按钮
|
|
// 将开启按钮变成关闭按钮
|
|
|
_this.airs[index].on = true;
|
|
_this.airs[index].on = true;
|
|
|
_this.airs[index].time = res.data.start_time;
|
|
_this.airs[index].time = res.data.start_time;
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ uni.hideLoading();
|
|
|
|
|
+ }, 1000);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- uni.hideLoading();
|
|
|
|
|
} else {
|
|
} else {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
icon: 'none',
|
|
|
title: res.data.message,
|
|
title: res.data.message,
|
|
|
- duration: 2000
|
|
|
|
|
|
|
+ duration: 2000,
|
|
|
|
|
+ success() {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ uni.hideLoading();
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
- uni.hideLoading();
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|