12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- import request from '../../../util/http'
- import apiUrl from '../../../util/apiUrl'
- var app = getApp();
- Page({
- data: {
- isservantsettinged: true,
- servantName: '',//保姆姓名
- weekday: '',//日前
- servantTypeValue: '',//保姆工种,
- servantDescribleList: [],
- noServantList:false,
- noServantPic:false
- },
- onLoad() {
- this.setData({
- servantName: app.globalData.servantInfo.employerName,
- weekday: app.globalData.servantInfo.servantTaskPeriod.workDay,
- servantTypeValue: app.globalData.servantInfo.servantType
- }),
- console.log("employRelationNo=" + app.globalData.employRelationNo)
- this.initServantDescribleInfo()
- },
- initServantDescribleInfo() {
- let params = {
- "employRelationNo": app.globalData.employRelationNo,
- "subjectType": "SN000001",
- "userType": "2"
- }
- request.httpServicePost(apiUrl.customerDescribleInfo, params).then(data => {
- console.log("保姆描述信息=" + data.length);
- if (data.length == 0) {
- this.setData({
- noServantPic: true,
- noServantList:false,
- servantDescribleList:[]
- });
- } else {
- console.log("aaa" + data[0])
- for(let i=0;i<data.length;i++){
- data[i]=(i+1)+'.'+data[i];
- }
- this.setData({
- noServantList: true,
- noServantPic:false,
- servantDescribleList:data
- });
- }
-
- }).catch(e => {
- console.log(e);
- })
- }
- });
|