|
@@ -56,7 +56,7 @@
|
|
|
<scroll-view scroll-y="true" :style="{height: screenHeight}" @scrolltoupper="scroll_to_upper"
|
|
<scroll-view scroll-y="true" :style="{height: screenHeight}" @scrolltoupper="scroll_to_upper"
|
|
|
@scrolltolower="scroll_to_lower">
|
|
@scrolltolower="scroll_to_lower">
|
|
|
<view class="list-items" v-for="(item, index) in airs" :key="index">
|
|
<view class="list-items" v-for="(item, index) in airs" :key="index">
|
|
|
- <view v-if="item.on" class="item-air" @longpress="itemLongPress($event, 1, item.air_ip)">
|
|
|
|
|
|
|
+ <view v-if="item.on === true" class="item-air" @longpress="itemLongPress($event, 1, item.air_ip)">
|
|
|
<view class="item-left">
|
|
<view class="item-left">
|
|
|
<view class="item-icon">
|
|
<view class="item-icon">
|
|
|
<view class="circle1"></view>
|
|
<view class="circle1"></view>
|
|
@@ -295,10 +295,10 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- console.log(res.data, tmpAirs[index].air_ip);
|
|
|
|
|
|
|
+ // console.log(res.data, tmpAirs[index].air_ip);
|
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
|
let data = res.data;
|
|
let data = res.data;
|
|
|
- if (data.is_on === '1') {
|
|
|
|
|
|
|
+ if (data.is_on == 1) {
|
|
|
if (typeof data.order_num === 'undefined') {
|
|
if (typeof data.order_num === 'undefined') {
|
|
|
// 提示返回信息
|
|
// 提示返回信息
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -310,6 +310,10 @@
|
|
|
tmpAirs[index].on = true
|
|
tmpAirs[index].on = true
|
|
|
tmpAirs[index].time = data.start_time
|
|
tmpAirs[index].time = data.start_time
|
|
|
tmpAirs[index].order_num = data.order_num
|
|
tmpAirs[index].order_num = data.order_num
|
|
|
|
|
+ } else {
|
|
|
|
|
+ tmpAirs[index].on = false
|
|
|
|
|
+ tmpAirs[index].time = ''
|
|
|
|
|
+ tmpAirs[index].order_num = ''
|
|
|
}
|
|
}
|
|
|
// 更新自己绑定的空调列表
|
|
// 更新自己绑定的空调列表
|
|
|
this.airs.push(tmpAirs[index])
|
|
this.airs.push(tmpAirs[index])
|
|
@@ -675,7 +679,7 @@
|
|
|
|
|
|
|
|
// console.log(res.data);
|
|
// console.log(res.data);
|
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
|
- if (res.data.is_on === '0') {
|
|
|
|
|
|
|
+ if (res.data.is_on == 0) {
|
|
|
// 显示已经关闭图标
|
|
// 显示已经关闭图标
|
|
|
this.airs[index].on = false
|
|
this.airs[index].on = false
|
|
|
uni.showToast({
|
|
uni.showToast({
|