Преглед изворни кода

Merge branch 'master' of http://47.102.110.240:3000/yuxiangpei/tbServantMini_cloud into master

yangyongyong пре 4 година
родитељ
комит
674ad3762e

+ 1 - 1
client/pages/servant/servantedit/servantedit.axml

@@ -2,7 +2,7 @@
 <!--服务设置-->
   <view class="servant-setting-header" a:if="{{tips}}">
     <image mode="scaleToFill" src="/image/notice-blue.png" class="notice-style"/>
-    <text onTap="toservantdetail">您可以查看保姆偏好,双向沟通更清晰</text>
+    <text onTap="toservantdetail">您可以查看服务标准</text>
     <image mode="scaleToFill" src="/image/close-blue.png" class="close-stle" onTap="closeTip"/>
   </view>
   <!--服务列表-->

+ 3 - 1
client/pages/servant/servantedit/servantedit.json

@@ -1 +1,3 @@
-{}
+{
+   "defaultTitle": "我的偏好"
+}

+ 1 - 1
client/pages/servant/servantsettings/servantsettings.axml

@@ -2,7 +2,7 @@
 <!--服务设置-->
   <view class="servant-setting-header" a:if="{{tips}}">
     <image mode="scaleToFill" src="/image/notice-blue.png" class="notice-style"/>
-    <text onTap="toservantdetail">服务标准</text>
+    <text onTap="toservantdetail">您可以查看服务标准</text>
     <image mode="scaleToFill" src="/image/close-blue.png" class="close-stle" onTap="closeTip"/>
   </view>
   <!--服务列表-->

+ 4 - 4
client/pages/servant/taskreminder/taskreminder.axml

@@ -50,7 +50,7 @@
       <view a:if="{{isreminds}}" a:for="{{taskList.servantTasks}}" key="{{index}}">
         <view class="tasks-list-item" a:if="{{item.state == 0}}">
           <text> {{item.itemName}}</text>
-          <view class="item-task-wrapper">
+          <view class="item-task-wrapper" a:if="{{todayShow==nowselectTime}}">
                  <view class="tasks-item-no" onTap="showcancel" data-id="{{item.id}}">
             <image class="icon-no" mode="scaleToFill" src="/image/icon-no.png"/>
           </view>
@@ -91,13 +91,13 @@
       
 
           <!--没有任务-->
-    <view a:if="{{!isreminds}}">
+    <view a:if="{{noTaskList}}">
       <view class="notasks">
-        <text>没有任务</text>
+        <text>今天没有任务</text>
       </view>
     </view>
   <!--没有任务-->
-    <view a:if="{{!workDay}}">
+    <view a:if="{{restDay}}">
       <view class="notasks">
         <text>今天是休息日</text>
       </view>

+ 60 - 22
client/pages/servant/taskreminder/taskreminder.js

@@ -6,9 +6,12 @@ var app = getApp();
 Page({
   data: {
     showchangetime: false,
+    todayShow: util.formatDate(new Date()),
     nowselectTime: util.formatDate(new Date()),
     datelist: [{ title: "周日", date: 0, cssName: '', id: 1, day: 0 },{ title: "周一", date: 0, cssName: '', id: 2, day: 0 }, { title: "周二", date: 0, cssName: '', id: 3, day: 0 }, { title: "周三", date: 0, cssName: '', id: 4, day: 0 }, { title: "周四", date: 0, cssName: '', id: 5, day: 0 }, { title: "周五", date: 0, cssName: '', id: 6, day: 0 }, { title: "周六", date: 0, cssName: '', id: 7, day: 0 }],
-    isreminds: true,
+    isreminds: false,//有任务
+    noTaskList:false,//没有任务
+    restDay:false,//今天是休息日
     showcancelbox: false,
     cancellist: [{ value: '1', label: '任务太多', checked: true }, { value: '2', label: '我不会', checked: false }, { value: '3', label: '任务不详细', checked: false }],
     taskList: [],
@@ -157,30 +160,65 @@ Page({
       "date": this.data.nowselectTime
     }
     request.httpServiceGet(apiUrl1.selectDayTaskItemPath, params).then(data => {
-      // 未设置任务
-      if (data.servantTasks.length == 0) {
-        this.setData({
+     console.log('任务状态');
+     console.log(data);
+    if(data.workDay==false){
+      // 今天是休息日
+       this.setData({
           isreminds: false,
-          workDay: true,
+          restDay: true,
+          noTaskList:false,
           isremindscose:false
         });
-      } else {
-        //判断是否是休息日
-        if(data.workDay){
-          // 今天有任务
-          this.setData({
-            taskList: data,
-            isreminds: true,
-            workDay: true,
-            isremindscose:true
-          });
-        }else{ //今天休息
-          this.setData({
-            workDay: false,
-            isremindscose:false
-          });
+    }else{
+        if (data.servantTasks.length == 0){
+          // 未设置任务
+           this.setData({
+          isreminds: false,
+          restDay: false,
+          noTaskList:true,
+          isremindscose:false
+        });
+        }else{
+          // 有任务
+            this.setData({
+          isreminds: true,
+          taskList: data,
+          restDay: false,
+          noTaskList:false,
+          isremindscose:true
+        });
+
         }
-      }
+
+    }
+
+      // 未设置任务
+      // if (data.servantTasks.length == 0) {
+      //   this.setData({
+      //     isreminds: false,
+      //     workDay: true,
+      //     isremindscose:false
+      //   });
+      // } else {
+      //   //判断是否是休息日
+      //   if(data.workDay){
+      //     // 今天有任务
+      //     this.setData({
+      //       taskList: data,
+      //       isreminds: true,
+      //       workDay: true,
+      //       isremindscose:true
+      //     });
+      //   }else{ //今天休息
+      //     this.setData({
+      //       workDay: false,
+      //       isremindscose:false
+      //     });
+      //   }
+      // }
+
+
     }
 
     ).catch(e => {
@@ -192,7 +230,7 @@ Page({
   //今日花销合计
   bindKeyInput(e) {
     let costval=e.detail.value;
-    if ((/^[0-9]*$/.test(e.detail.value))) {
+    if ((/^[0-9.]*$/.test(e.detail.value))) {
       this.setData({
         cost: costval,
         costvalue:costval