浏览代码

feat 环宇荟

anxiaoxia 3 年之前
父节点
当前提交
ae6bb34893
共有 3 个文件被更改,包括 40 次插入23 次删除
  1. 23 9
      pages/adjust/index.js
  2. 10 9
      pages/adjust/index.wxml
  3. 7 5
      project.config.json

+ 23 - 9
pages/adjust/index.js

@@ -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});
+        // TODO 关
+      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
-      });
+        // TODO kai
+    //  if (res.message) {
+    //     this.setData({failmessage:res.message, trunupAction: true})
+    //  }else{
+        this.setData({
+            secondSpaceStatus: res.spaceStatus,
+            secondNotice: res.notice,
+            secondIcon: res.icon,
+            failmessage:res.message || '',
+            trunupAction: true
+        });
+    //  }
+   
       this.buildContact();
     })
   },

+ 10 - 9
pages/adjust/index.wxml

@@ -193,16 +193,16 @@
 >
     <view class="feedback_box">
         <view class="feedimgbox flex_row">
-            <view  class="lottie">
+            <view  class="lottie" >
                 <lottie id="lottie" animationData="{{spacestatusList[spaceStatusId].canvasDate}}" width="20" height="20"/>
             </view>
             <text class="feedtext_title">{{spaceStatus}}</text>
         </view>
         <view class="flex_column feedtext_box" wx:for="{{notice}}" wx:key="{{index}}">
-            <text class="feedtext_desc flex_rew">{{item}}</text>
+            <text class="feedtext_desc flex_rew" style="font-size: 14px;margin: 20rpx 0">{{item}}</text>
         </view>
         <!-- 滚动列表 -->
-        <view class="noticbox" wx:if="{{equipmentStatustext&&equipmentStatustext.length}}">
+        <view class="noticbox" wx:if="{{equipmentStatustext&&equipmentStatustext.length }}">
             <swiper vertical autoplay duration="300" circular interval="1500">
                 <block wx:for="{{equipmentStatustext}}" >
                     <swiper-item>
@@ -214,7 +214,7 @@
                 </block>
             </swiper>
         </view>
-        <view class="envpanel flex_row" wx:if="{{currentIndex!=5&&spaceDetail.temperature}}">
+        <view class="envpanel flex_row" wx:if="{{willAvg !='--'  && currentIndex!=5 && spaceDetail.temperature }}">
             <view class="panel_left">
                 <text class="left_txt">当前温度</text>
                 <view><text class="left_num">{{spaceDetail.temperature}}</text>°C</view>
@@ -230,7 +230,7 @@
                     <text class="left_num" wx:else>{{willAvg}}</text>°C</view>
             </view>
         </view>
-        <view class="envpanel flex_row" wx:if="{{currentIndex==5}}">
+        <view class="envpanel flex_row" wx:if="{{currentIndex==5 }}">
             <view class="panel_left">
                 <text class="left_txt">当前风速</text>
                 <view class="rotate">
@@ -259,8 +259,8 @@
 >
     <view class="feedback_box">
         <view class="flex_column feed_tips">
-            <text>正在关机</text>
-            <text>反馈已提交,设备正在关机中!</text>
+            <text> {{failmessage ? '空调无法频繁开关' : '正在关机' }}</text>
+            <text>{{failmessage ?  failmessage :'反馈已提交,设备正在关机中!'}}</text>
         </view>
         <view class="closedown iknow" catchtap="knowCloseClick">
             我知道了
@@ -273,12 +273,13 @@
 >
     <view class="seconddetail">
         <view class="secondtxt flex_row secondtxt_title">
-            <view class="lottie" hidden="{{!lottieShow}}">
+            <view class="lottie"  wx:if="{{!lottieShow}}">
                 <lottie id="lottieup" animationData="{{spacestatusList[secondIcon-1].canvasDate}}" width="25" height="25" />
             </view>
-            {{secondSpaceStatus}}
+            {{secondSpaceStatus || '空调无法频繁开关'}}
         </view>
         <view class="secondtxt flex_row">{{secondNotice}}</view>
+        <view class="secondtxt flex_row" style="padding-bottom: 40rpx;" wx:if="{{failmessage}}">{{failmessage}}</view>   
         <view class="closedown iknow" bindtap="commitClose">关闭</view>
     </view>
 </van-action-sheet>

+ 7 - 5
project.config.json

@@ -21,23 +21,25 @@
     "checkSiteMap": true,
     "uploadWithSourceMap": true,
     "compileHotReLoad": false,
+    "lazyloadPlaceholderEnable": false,
     "useMultiFrameRuntime": true,
     "useApiHook": true,
-    "useApiHostProcess": false,
+    "useApiHostProcess": true,
     "babelSetting": {
       "ignore": [],
       "disablePlugins": [],
       "outputPath": ""
     },
     "enableEngineNative": false,
-    "bundle": false,
     "useIsolateContext": true,
-    "useCompilerModule": true,
-    "userConfirmedUseCompilerModuleSwitch": false,
     "userConfirmedBundleSwitch": false,
     "packNpmManually": false,
     "packNpmRelationList": [],
-    "minifyWXSS": true
+    "minifyWXSS": true,
+    "disableUseStrict": false,
+    "showES6CompileOption": false,
+    "useCompilerPlugins": false,
+    "minifyWXML": true
   },
   "compileType": "miniprogram",
   "libVersion": "2.11.1",