|
@@ -204,7 +204,7 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
// 建立租户关联
|
|
|
- buildContact(){
|
|
|
+ async buildContact(){
|
|
|
let currentTenantId=$.storage.get('tenantId');
|
|
|
if(currentTenantId!==this.data.spaceDetail.tenantId){
|
|
|
// 通过扫码改变租户
|
|
@@ -214,14 +214,17 @@ Page({
|
|
|
$.storage.set('projectId',this.data.spaceDetail.projectId);
|
|
|
$.storage.set('tenantId',this.data.spaceDetail.tenantId);
|
|
|
}
|
|
|
+ let top = (this.data.spaceDetail.top.toString())=="false"?0:1;
|
|
|
const data={
|
|
|
"userId":$.store.get('userId'),//用户id
|
|
|
"projectId":this.data.spaceDetail.projectId,//项目id
|
|
|
"spaceId":this.data.spaceDetail.id,//空间id
|
|
|
"openId":$.store.get('openId'),
|
|
|
- flag:1
|
|
|
+ flag:1,
|
|
|
+ top:top,
|
|
|
}
|
|
|
- contactTenant(data).then(res=>{
|
|
|
+ console.log(this.data.spaceDetail.top,"this.data.spaceDetail.top?")
|
|
|
+ await contactTenant(data).then(res=>{
|
|
|
console.log("成功")
|
|
|
})
|
|
|
},
|
|
@@ -504,8 +507,11 @@ Page({
|
|
|
// 加期望温度
|
|
|
addClick(){
|
|
|
let tepNum=this.data.targetTemp;
|
|
|
- let firstNum = tepNum.toString().split('.')[0]
|
|
|
- let lastNum = tepNum.toString().split('.')[1]
|
|
|
+ let firstNum = tepNum.toString().split('.')[0];
|
|
|
+ let lastNum = tepNum.toString().split('.')[1];
|
|
|
+ if(firstNum>=28){
|
|
|
+ return
|
|
|
+ }
|
|
|
if(lastNum>=5){
|
|
|
this.setData({targetTemp:Number(firstNum)+1})
|
|
|
}else{
|
|
@@ -517,6 +523,9 @@ Page({
|
|
|
let tepNum=this.data.targetTemp;
|
|
|
let firstNum = tepNum.toString().split('.')[0]
|
|
|
let lastNum = tepNum.toString().split('.')[1]
|
|
|
+ if(firstNum<=18&&!lastNum){
|
|
|
+ return ;
|
|
|
+ }
|
|
|
if(lastNum>5){
|
|
|
this.setData({targetTemp:Number(firstNum)+0.5})
|
|
|
}else if(lastNum<=5){
|
|
@@ -548,7 +557,7 @@ Page({
|
|
|
"value":this.data.targetTemp
|
|
|
}
|
|
|
|
|
|
- submitAdjust(data).then(res=>{
|
|
|
+ submitAdjust(data).then(async res=>{
|
|
|
if(res.result="success"){
|
|
|
wx.hideLoading();
|
|
|
setTimeout(function () {
|
|
@@ -559,9 +568,10 @@ Page({
|
|
|
}, 300)
|
|
|
|
|
|
}
|
|
|
- this.setData({effectTime:-1})
|
|
|
- this.buildContact();
|
|
|
- this.getChartDate();
|
|
|
+ // this.setData({effectTime:-1})
|
|
|
+ await this.buildContact();
|
|
|
+ this.isfeeded();
|
|
|
+ // this.getChartDate();
|
|
|
})
|
|
|
},
|
|
|
// 修改全天温度
|
|
@@ -587,7 +597,7 @@ Page({
|
|
|
"value":this.data.targetTemp,
|
|
|
"customPlan":customPlan
|
|
|
}
|
|
|
- submitAdjust(data).then(res=>{
|
|
|
+ submitAdjust(data).then(async res=>{
|
|
|
wx.hideLoading();
|
|
|
setTimeout(function () {
|
|
|
wx.showToast({
|
|
@@ -595,8 +605,9 @@ Page({
|
|
|
duration: 2000
|
|
|
})
|
|
|
}, 300)
|
|
|
- this.buildContact();
|
|
|
- this.getChartDate();
|
|
|
+ await this.buildContact();
|
|
|
+ this.isfeeded();
|
|
|
+ // this.getChartDate();
|
|
|
})
|
|
|
},
|
|
|
showTips(){
|
|
@@ -720,7 +731,8 @@ Page({
|
|
|
this.setData({spaceDetail:options},()=>{
|
|
|
this.checkGuide();
|
|
|
this.getnowSeason();
|
|
|
- if(this.data.spaceDetail.roomFuncType&&this.data.spaceDetail.roomFuncType.startsWith("31")){
|
|
|
+ let higthSpace=["311","312"];
|
|
|
+ if(this.data.spaceDetail.roomFuncType&&higthSpace.includes(this.data.spaceDetail.roomFuncType)){
|
|
|
this.setData({singleOffice:true})
|
|
|
}
|
|
|
this.checkPower();
|
|
@@ -756,10 +768,10 @@ Page({
|
|
|
this.setData({spaceDetail:content[0]},()=>{
|
|
|
this.checkGuide();
|
|
|
this.getnowSeason();
|
|
|
- if(this.data.spaceDetail.nextOpenTime){
|
|
|
- let value = this.formatTimeall(this.data.spaceDetail.nextOpenTime);
|
|
|
- this.setData({nextOpenTime:value})
|
|
|
- }
|
|
|
+ // if(this.data.spaceDetail.nextOpenTime){
|
|
|
+ // let value = this.formatTimeall(this.data.spaceDetail.nextOpenTime);
|
|
|
+ // this.setData({nextOpenTime:value})
|
|
|
+ // }
|
|
|
if(this.data.spaceDetail.roomFuncType&&this.data.spaceDetail.roomFuncType.startsWith("31")){
|
|
|
this.setData({singleOffice:true})
|
|
|
}
|