gaoyognxing vor 4 Jahren
Ursprung
Commit
31e9f45a97

+ 18 - 23
client/pages/customer/servantdetail/servantdetail.axml

@@ -6,43 +6,38 @@
     <text>保姆还未设置偏好</text>
   </view>
 </view>
- <!--已经设置过保姆偏好-->
+<!--已经设置过保姆偏好-->
 <view a:if="{{isservantsettinged}}">
   <view class="common-page-padding servantdetail-servant-page">
     <!---阿姨类型--->
     <view class="common-card servantdetailitem">
       <view class="cell-title">
-      <label>{{servantName}}</label>
-      <image mode="scaleToFill" src="/image/icon-edit.png"/>
+        <label>{{servantName}}</label>
+        <image mode="scaleToFill" src="/image/icon-edit.png"/>
       </view>
       <view class="cell-list">
-       <view class="work-day">{{weekday}}</view>
+        <view class="work-day">{{weekday}}</view>
       </view>
       <view class="cell-type">
         <view class="service-model">保姆工种:{{formate.serviceType(servantTypeValue)}}</view>
       </view>
     </view>
-    <!---阿姨类型--->
-    <view class="common-card servantdetailitem">
-      <view class="cell-title">做饭类</view>
-      <view class="servant-list">
-        <view class="good-list">
-          <view>1. 您擅长做的菜系?</view>
-          <view class="good-item-list">粤菜</view>
+    <view >
+      <!-- 保姆列表 -->
+      <view class="common-card servantdetailitem">
+        <view a:for="{{servantDescribleList}}" key="{{index}}">
+          <view class="servant-list">
+            <view class="good-list">
+              <view class="good-item-list">{{item}}</view>
+            </view>
+          </view>
         </view>
       </view>
-      <view class="servant-list">
-        <view class="good-list">
-          <view>1. 您擅长做的菜系?</view>
-          <view class="good-item-list">粤菜</view>
-        </view>
-      </view>
-      <view class="servant-list">
-        <view class="good-list">
-          <view>1. 您擅长做的菜系?</view>
-          <view class="good-item-list">粤菜</view>
+      <!-- 暂无保姆 -->
+      <view a:if="{{noServantList}}">
+        <view class="no-content-wrapper">
+          <image mode="aspectFill" src="/image/no-content.png"/>
         </view>
       </view>
     </view>
-  </view>
-</view>
+  </view>

+ 39 - 8
client/pages/customer/servantdetail/servantdetail.js

@@ -3,16 +3,47 @@ import apiUrl from '../../../util/apiUrl'
 var app = getApp();
 Page({
   data: {
-    isservantsettinged:true,
-    servantName:'',//保姆姓名
-    weekday:'',//日前
-    servantTypeValue:''//保姆工种
+    isservantsettinged: true,
+    servantName: '',//保姆姓名
+    weekday: '',//日前
+    servantTypeValue: '',//保姆工种,
+    servantDescribleList: [],
+    noServantList:false,
   },
   onLoad() {
     this.setData({
-      servantName:app.globalData.relationInfo.servantName,
-      weekday:app.globalData.relationInfo.servantTaskPeriod.workDay,
-      servantTypeValue:app.globalData.relationInfo.servantType
-    })
+      servantName: app.globalData.relationInfo.servantName,
+      weekday: app.globalData.relationInfo.servantTaskPeriod.workDay,
+      servantTypeValue: app.globalData.relationInfo.servantType
+    }),
+      console.log("employRelationNo=" + app.globalData.employRelationNo)
+    this.initServantDescribleInfo()
   },
+  initServantDescribleInfo() {
+    let params = {
+      "employRelationNo": app.globalData.employRelationNo,
+      "subjectType": "SN000002",
+      "userType": "1"
+    }
+    request.httpServicePost(apiUrl.servantDescribleInfo, params).then(data => {
+      console.log("保姆描述信息=" + data.length);
+      if (data.length == 0) {
+        this.setData({
+          noServantList: true,
+          servantDescribleList:[]
+        });
+      } else {
+        console.log("aaa" + data[0])
+        this.setData({
+          noServantList: false,
+          servantDescribleList:data
+        });
+      }
+      
+
+    }).catch(e => {
+      console.log(e);
+
+    })
+  }
 });