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

保姆工作站,是否设置完成

una пре 4 година
родитељ
комит
f3cf5d6748

+ 2 - 2
client/pages/customer/customerCenter/customerCenter.axml

@@ -23,7 +23,7 @@
               <text class="copy-btn" onTap="copyCode">复制</text>
               </view>
           </view>
-          <view class="about-right">阿姨偏好</view>
+          <view class="about-right" onTap="switchSerHobby">阿姨偏好</view>
        </view>
  </view>
  <!-- 通知 -->
@@ -59,7 +59,7 @@
      
   </view>
   <!-- 服务标准 -->
-   <view class="common-card module-card">
+   <view class="common-card module-card"  onTap="switchSerStandard">
       <view class="module-text">
       <view class="module-title">
       服务标准

+ 51 - 10
client/pages/customer/customerCenter/customerCenter.js

@@ -67,7 +67,7 @@ Page({
      request.httpServiceGet(apiUrl.getRelationInfoPath,params).then(data=>{
         console.log(data);
         app.globalData.relationInfo=data;
-        let servantSetState=data.servantSetState;
+        let employSetState=data.employSetState;
       
         let isOnlyOne=(data.isMoreServant<=1);
          let  isInvalid=(data.isInvalid=='1');
@@ -80,21 +80,22 @@ Page({
          bindCode:data.employIdentifier
        });
       // 未完成初次设置的
-        if(servantSetState=='0'){
+        if(employSetState=='1'){
             this.setData({
+         unSetServiceModal:false,
+        });
+        // 获取任务设置和服务标准设置
+    this.isChooseSerStanSubject();
+    this.selectTodayTaskItem();
+           
+        }else{
+           this.setData({
             //  unSetServiceModal:true,
             //  noSetSerStan:true,
              noAddTaskShow:true,
              });
           //  获取服务标准和任务设置的具体情况
           this.isSetServiceAndTask();
-        }else{
-            this.setData({
-         unSetServiceModal:false,
-        });
-        // 获取任务设置和服务标准设置
-    this.isChooseSerStanSubject();
-    this.selectTodayTaskItem();
         }
           }).catch(e=>{
            console.log(e);
@@ -309,6 +310,28 @@ Page({
 
     }
   },
+   // 跳转到服务标准页面
+  switchSerStandard(){
+//       if(this.data.noSetSerStan){
+//  my.navigateTo({
+//       url: '../servantsettings/servantsettings'
+//     });
+//       }else{
+//          my.navigateTo({
+//       url: '../servantlist/servantlist'
+//     });
+//       }
+    
+  },
+    switchSerHobby(){
+      // 跳转到服务偏好页面
+    //    my.navigateTo({
+    //   url: '../servantdetail/servantdetail'
+    // });
+    
+  
+  },
+
  // 点击开启体验按钮
   onFinishButtonClick(e){
     console.log(e.target);
@@ -318,13 +341,31 @@ Page({
     });
     // 首次设置完成提交后台完成引导设置
 
-
+  this.finishAllSet();
 
     }else{
      
     }
   },
 
+  finishAllSet(){
+    let params={
+      employRelationNo:app.globalData.employRelationNo,
+      employSetState:'1'
+    }
+      request.httpServicePost(apiUrl.updateEmploySetStatePath,params).then(data=>{
+        console.log(data);
+        
+
+    
+          }).catch(e=>{
+           console.log(e);
+           
+        })
+  }
+
+
+
 
 
 });

+ 13 - 1
client/util/apiUrl.js

@@ -41,6 +41,15 @@ const isSetServiceAndTaskPath=baseService+'/notice/isSetServiceAndTask';
 //post /employerRelation/updateEmploySetState  雇主端-设置雇佣之间第一次通知完成状态:0没有设置,1已设置完成,传EmployRelationNo和EmploySetState
 const updateEmploySetStatePath=baseService+'/employerRelation/updateEmploySetState';
 
+//POST  /notice/getEmployerNotice   雇主端 工作站栏目通知,传 employRelationNo 和userId
+const getEmployerNoticePath=baseService+'/notice/getEmployerNotice';
+
+// POST /notice/getServantNotice    保姆端 工作站栏目通知,传 employRelationNo 和userId
+const getServantNoticePath=baseService+'/notice/getServantNotice';
+
+//POST  /notice/userReadNotice    读取通知 传 雇佣关系编号,用户id,通知类型
+const userReadNoticePath=baseService+'/notice/userReadNotice';
+
 
 export default{
 registerUserPath,
@@ -48,6 +57,7 @@ getUserInfoPath,
 findByEmployerIdListPath,
 findByServantIdListPath,
 createServantRelationPath,
+updateEmployerRelationPath,
 relationEmployerPath,
 updateEmployerNamePath,
 getRelationInfoPath,
@@ -58,5 +68,7 @@ getDailyTaskList,
 completeEditDailyTask,
 isSetServiceAndTaskPath,
 updateEmploySetStatePath,
-updateEmployerRelationPath
+getEmployerNoticePath,
+getServantNoticePath,
+userReadNoticePath
 }