|
@@ -1,6 +1,7 @@
|
|
|
var util = require('../../../util/util.js')
|
|
|
import request from '../../../util/http'
|
|
|
import apiUrl1 from '../../../util/apiUrl1'
|
|
|
+import apiUrl from '../../../util/apiUrl'
|
|
|
var app = getApp();
|
|
|
Page({
|
|
|
data: {
|
|
@@ -25,6 +26,7 @@ Page({
|
|
|
that.setnowweek();
|
|
|
this.selectDayTaskItem();
|
|
|
//this.selectDayTaskCost();
|
|
|
+ this.homelist();//计算家庭数量
|
|
|
},
|
|
|
setnowweek(){
|
|
|
let data = this.data.datelist;
|
|
@@ -236,5 +238,27 @@ switchList(){
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
+ //计算家庭数量
|
|
|
+ homelist(){
|
|
|
+ let params={
|
|
|
+ "servantId":app.globalData.userInfo.id,
|
|
|
+ "pageNo": 1,
|
|
|
+ "pageSize": 100,
|
|
|
+ }
|
|
|
+ request.httpServicePost(apiUrl.findByServantIdListPath,params).then(data=>{
|
|
|
+ console.log('多个家庭:'+data);
|
|
|
+ if(data.dataList.length>1){
|
|
|
+ this.setData({
|
|
|
+ homecssname:true
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ this.setData({
|
|
|
+ homecssname:false
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(e=>{
|
|
|
+ console.log(e);
|
|
|
+ })
|
|
|
+ },
|
|
|
});
|