|
@@ -99,7 +99,7 @@ Page({
|
|
|
},
|
|
|
picInitUrl:$.store.get("picInitUrl"),
|
|
|
},
|
|
|
- onHide(){
|
|
|
+ onUnload(){
|
|
|
clearInterval(refreshTimer);
|
|
|
refreshTimer=null;
|
|
|
},
|
|
@@ -215,6 +215,10 @@ Page({
|
|
|
},
|
|
|
|
|
|
changeType(e) {
|
|
|
+ this.setData({
|
|
|
+ notice: '',
|
|
|
+ willAvg:'--'
|
|
|
+ });
|
|
|
if(this.data.bgSeasonType=="Transition"){
|
|
|
wx.showModal({
|
|
|
title: '现在是过渡季不可调节',
|
|
@@ -237,12 +241,14 @@ Page({
|
|
|
this.setData({
|
|
|
tempTypeValue: currentIndex,
|
|
|
currentIndex:currentIndex,
|
|
|
+ checkType:'temp',
|
|
|
feedBack:true
|
|
|
});
|
|
|
} else {
|
|
|
this.setData({
|
|
|
windTypeValue: currentIndex,
|
|
|
currentIndex:currentIndex,
|
|
|
+ checkType:'wind',
|
|
|
feedBack:true
|
|
|
});
|
|
|
}
|
|
@@ -260,7 +266,7 @@ Page({
|
|
|
});
|
|
|
let textMsg = "";
|
|
|
let textMsgarr=[];
|
|
|
- this.data.equipmentStatus.forEach(item => {
|
|
|
+ this.data.equipmentStatus && this.data.equipmentStatus.forEach(item => {
|
|
|
if (item.actions) {
|
|
|
item.actions.forEach(items => {
|
|
|
let textMsgobj={};
|
|
@@ -278,7 +284,7 @@ Page({
|
|
|
getfeedBack(data).then(res => {
|
|
|
let notice = res.notice ? res.notice.split('。') : [];
|
|
|
this.setData({
|
|
|
- spaceStatus: res.spaceStatus,
|
|
|
+ spaceStatus: res.spaceStatus || res.message,
|
|
|
spaceStatusId: res.icon - 1,
|
|
|
notice: notice,
|
|
|
willAvg:res.avg||'--',
|
|
@@ -336,7 +342,8 @@ Page({
|
|
|
nextOpenTime:this.data.spaceDetail.nextOpenTime||"",
|
|
|
}
|
|
|
workLeave(data).then(res=>{
|
|
|
- this.setData({trunAction:true});
|
|
|
+
|
|
|
+ this.setData({trunAction:true,failmessage:res.message || ''});
|
|
|
this.buildContact();
|
|
|
})
|
|
|
},
|
|
@@ -366,12 +373,19 @@ Page({
|
|
|
userId:$.store.get('userId')
|
|
|
}
|
|
|
openSpace(data).then(res=>{
|
|
|
- this.setData({
|
|
|
- secondSpaceStatus: res.spaceStatus,
|
|
|
- secondNotice: res.notice,
|
|
|
- secondIcon: res.icon,
|
|
|
- trunupAction: true
|
|
|
- });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ this.setData({
|
|
|
+ secondSpaceStatus: res.spaceStatus,
|
|
|
+ secondNotice: res.notice,
|
|
|
+ secondIcon: res.icon,
|
|
|
+ failmessage:res.message || '',
|
|
|
+ trunupAction: true
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
this.buildContact();
|
|
|
})
|
|
|
},
|
|
@@ -835,9 +849,9 @@ Page({
|
|
|
refreshTimer = null;
|
|
|
}
|
|
|
let refreshTime=$.store.get("autoRefreshTime");
|
|
|
- refreshTimer = setTimeout(()=>{
|
|
|
+ refreshTimer = setInterval(()=>{
|
|
|
fn();
|
|
|
- this.autoRefresh(fn);
|
|
|
+
|
|
|
},refreshTime)
|
|
|
},
|
|
|
|
|
@@ -849,10 +863,11 @@ Page({
|
|
|
this.getDetail(options.md1);
|
|
|
this.autoRefresh(this.getDetail);
|
|
|
}else{
|
|
|
- options.humidity&&(options.humiditylevel = this.checkLevel(options.humidity,"humidity"));
|
|
|
+
|
|
|
options.co2&&(options.co2level = this.checkLevel(options.co2,"co2"));
|
|
|
options.pm25&&(options.pm25level = this.checkLevel(options.pm25,"pm25"));
|
|
|
options.hcho&&(options.hcholevel = this.checkLevel(options.hcho,"hcho"));
|
|
|
+ */
|
|
|
options.isPassengerPassShow&&(options.isPassengerPassShow=JSON.parse(options.isPassengerPassShow));
|
|
|
|
|
|
|
|
@@ -868,6 +883,7 @@ Page({
|
|
|
this.setData({singleOffice:true})
|
|
|
}
|
|
|
this.checkPower();
|
|
|
+ this.getDetail();
|
|
|
this.autoRefresh(this.getDetail);
|
|
|
})
|
|
|
}
|