Quellcode durchsuchen

任务提醒bug修改

yangyongyong vor 4 Jahren
Ursprung
Commit
c25a0d6030

+ 13 - 7
client/pages/customer/taskreminder/taskreminder.axml

@@ -78,15 +78,21 @@
         <text>还没有任务</text>
       </view>
     </view>
-      <!---没有任务花销计算不显示-->
-      <view a:if="{{isreminds}}" class="tast-moneybox">
-        <view class="tasks-list-money">
-          <view class="tasks-list-pay">今日花销合计</view>
-         
-          <text> {{selectDailyCost}}元</text>
-        </view>
+    <!--今天市休息日-->
+    <view a:if="{{!workDay}}">
+      <view class="notasks">
+        <text>今天市休息日</text>
       </view>
     </view>
+    <!---没有任务花销计算不显示-->
+    <view  a:if="{{isremindscose}}" class="tast-moneybox">
+      <view class="tasks-list-money">
+        <view class="tasks-list-pay">今日花销合计</view>
+        
+        <text> {{selectDailyCost}}元</text>
+      </view>
+    </view>
+    </view>
   <!---弹出日历--->
   <modal show="{{showchangetime}}">
     <calendar

+ 18 - 6
client/pages/customer/taskreminder/taskreminder.js

@@ -145,16 +145,28 @@ Page({
     }
     request.httpServiceGet(apiUrl1.selectDayTaskItemPath, params).then(data => {
       // 未设置任务
-      if (data.length == 0) {
+      if (data.servantTasks.length == 0) {
         this.setData({
           isreminds: false,
+          workDay: true,
+          isremindscose:false
         });
       } else {
-        // 今天有任务
-        this.setData({
-          taskList: data,
-          isreminds: true
-        });
+        //判断是否是休息日
+        if(data.servantTasks.workDay){
+          // 今天有任务
+          this.setData({
+            taskList: data,
+            isreminds: true,
+            workDay: true,
+            isremindscose:true
+          });
+        }else{ //今天休息
+          this.setData({
+            workDay: false,
+            isremindscose:false
+          });
+        }
       }
     }