Bläddra i källkod

实现保姆端服务标准

7UQPV1X6D0Z54SW\Administrator 3 år sedan
förälder
incheckning
46f9d1311f

+ 9 - 34
client/pages/servant/servantsettings/servantsettings.axml

@@ -6,44 +6,19 @@
     <image mode="scaleToFill" src="/image/close-blue.png" class="close-stle"/>
   </view>
   <!--服务列表-->
-  <view class="setting-list">
+  <view class="setting-list" a:for="{{servantlist}}" key="{{index}}">
     <view class="setting-list-title">
-      做饭类<text>1/6</text>
+      {{item.subjectType}}<text>1/ {{servantlist.length}}</text>
     </view>
-    <view class="setting-list-item">
-      <text class="item-title">1.您家人喜欢的菜系是那种?</text>
-      <view class="item-body">
-        <checkbox value="0" checked="true" class="item-body-checkbox"/><text>粤菜</text>
-      </view>
-      <view class="item-body">
-        <checkbox value="1" class="item-body-checkbox"/><text>川菜</text>
-      </view>
-      <view class="item-body">
-        <checkbox value="3" class="item-body-checkbox"/><text>本帮菜</text>
-      </view>
-      <view class="item-body">
-        <checkbox value="5" class="item-body-checkbox"/><text>自定义</text>
-      </view>
-      <view class="item-body">
-         <textarea placeholder="请输入文字"></textarea>
-      </view>
-    </view>
-    <view class="setting-list-item">
-      <text class="item-title">1.您家人喜欢的菜系是那种?</text>
-      <view class="item-body">
-        <checkbox value="0" checked="true" class="item-body-checkbox"/><text>粤菜</text>
-      </view>
-      <view class="item-body">
-        <checkbox value="1" class="item-body-checkbox"/><text>川菜</text>
-      </view>
-      <view class="item-body">
-        <checkbox value="3" class="item-body-checkbox"/><text>本帮菜</text>
-      </view>
-      <view class="item-body">
-        <checkbox value="5" class="item-body-checkbox"/><text>自定义</text>
+    <view class="setting-list-item" a:for="{{item.subjectList}}" a:for-item="subjectitem" key="{{subjectindex}}">
+      <view  a:if="{{subjectitem.isChoose}}">
+        <text class="item-title">{{subjectitem.subject}}</text>
+        <view class="item-body" a:for="{{subjectitem.answer}}" a:for-item="answeritem" key="{{answerindex}}">
+          <checkbox value="{{answeritem.value}}" checked="true" class="item-body-checkbox"/><text>{{answeritem.key}}</text>
+        </view>
       </view>
       <view class="item-body">
-         <textarea placeholder="请输入文字"></textarea>
+        <textarea placeholder="请输入文字"></textarea>
       </view>
     </view>
   </view>

+ 20 - 2
client/pages/servant/servantsettings/servantsettings.js

@@ -1,4 +1,22 @@
+import request from '../../../util/http'
+import apiUrl from '../../../util/apiUrl1'
+import util from '../../../util/util'
+import moment from 'moment'
+var app = getApp();
+
 Page({
-  data: {},
-  onLoad() {},
+  data: {
+    servantlist:[],
+  },
+  onLoad() {
+    this.getservantlist("SN000002");
+  },
+  getservantlist(subjectType){
+     request.httpServiceGet(apiUrl.servantappletservicePath,{subjectType:subjectType}).then(data=>{
+        console.log(data);
+        this.setData({
+          servantlist: data
+        });
+      });
+  },
 });

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

@@ -1,3 +1,3 @@
 {
-    "defaultTitle": "保姆偏好"
+    "defaultTitle": "服务标准"
 }

+ 19 - 0
client/pages/servant/taskreminder/taskreminder.acss

@@ -202,14 +202,30 @@
 .cancel-box{
   width: 100%;
 }
+.cancel-box label{
+  width: 100%;
+  text-align: left;
+  padding-left: 20%;
+  font-size: 26rpx;
+}
 .cancel-box text{
   font-size: 46rpx;
   font-weight: bold;
   margin-bottom: 30rpx;
   display: inline-block;
 }
+.radio{
+  width: 24rpx;
+  height: 24rpx;
+}
+radio-checked::before {
+  width: 24rpx;
+  height: 24rpx;
+  background-color: #09AFFF;
+}
 .cancel-box radio-group{
   width: 100%;
+  margin-bottom: 67rpx;
 }
 .cancel-left{
   width: 50%;
@@ -225,4 +241,7 @@
   height: 102rpx;
   line-height: 102rpx;
   border-top: 1rpx #e5e5e5 solid;
+  font-size: 36rpx;
+  color: #09AFFF;
+  font-weight: bold;
 }

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

@@ -108,17 +108,17 @@
   <modal show="{{showcancelbox}}">
     <view class="cancel-box">
         <text>取消原因</text>
-        <radio-group>
+        <radio-group class="radio-group weui-input">
           <label a:for="{{cancellist}}"  a:key={{value}}>
-            <radio value="{{item.value}}" checked="{{item.checked}}"/>{{item.label}}
+            <radio value="{{item.value}}" class="radio" checked="{{item.checked}}"/>{{item.label}}
           </label>
         </radio-group>
-        <view class="cancel-left" onTap="hidecnacelbox" >
-          取消
-        </view>
-        <view class="cancel-right">
-          确认选择
-        </view>
+    </view>
+    <view class="am-modal-buttons--vertical" onTap="hidecnacelbox" >
+      取消
+    </view>
+    <view class="am-modal-buttons--vertical">
+      确认选择
     </view>
   </modal>
 </view>

+ 8 - 0
client/util/apiUrl1.js

@@ -0,0 +1,8 @@
+let baseService='/servantappletservice';
+// 授权后注册
+const servantappletservicePath = baseService+'/servantlove/getSubjectWhenFirst';
+
+
+export default{
+servantappletservicePath,
+}