|
@@ -1,21 +1,41 @@
|
|
|
|
+import request from '../../../util/http'
|
|
|
|
+import apiUrl from '../../../util/apiUrl'
|
|
|
|
+var app = getApp();
|
|
Page({
|
|
Page({
|
|
data: {
|
|
data: {
|
|
- washingandnursing: [{text:'洗衣服',id:'1',},{text:'熨烫衣服',id:'2',},{text:'晾晒收衣',id:'3',}],
|
|
|
|
- cooking: [{text:'做早餐',id:'1'},{text:'做午餐',id:'2'},{text:'做晚餐',id:'3'}],
|
|
|
|
- cleaningclass: [{text:'打扫全屋',id:'1'},{text:'打扫客厅',id:'2'},{text:'打扫卧室',id:'3'},{text:'打扫书房',id:'4'},{text:'打扫厨房',id:'5'},{text:'打扫卫生间',id:'6'},{text:'打扫院子',id:'7'}],
|
|
|
|
- careolder:[{text:'照顾老人',id:'1'},{text:'为老人做饭',id:'2'},{text:'为老人做擦洗服务',id:'3'}],
|
|
|
|
- children:[{text:'打扫全屋',id:'1'},{text:'打扫客厅',id:'2'},{text:'打扫卧室',id:'3'},{text:'打扫书房',id:'4'},{text:'打扫厨房',id:'5'},{text:'打扫卫生间',id:'6'},{text:'打扫院子',id:'7'}],
|
|
|
|
- pets:[{text:'打扫全屋',id:'1'},{text:'打扫客厅',id:'2'},{text:'打扫卧室',id:'3'},{text:'打扫书房',id:'4'},{text:'打扫厨房',id:'5'},{text:'打扫卫生间',id:'6'},{text:'打扫院子',id:'7'}],
|
|
|
|
- washingandnursinglist:[],
|
|
|
|
- cookinglist:[],
|
|
|
|
- cleaningclasslist:[],
|
|
|
|
- careolderlist:[],
|
|
|
|
- childrenlist:[],
|
|
|
|
- petslist:[]
|
|
|
|
|
|
+ allList:[]
|
|
},
|
|
},
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
console.log(options);
|
|
console.log(options);
|
|
},
|
|
},
|
|
|
|
+ onShow(){
|
|
|
|
+ this.initDailyTaskList();
|
|
|
|
+ },
|
|
|
|
+ initDailyTaskList(){
|
|
|
|
+ let params={
|
|
|
|
+ }
|
|
|
|
+ request.httpServiceGet(apiUrl.getDailyTaskList,params).then(data=>{
|
|
|
|
+ console.log(data);
|
|
|
|
+ if(data.length>0){
|
|
|
|
+ this.setData({
|
|
|
|
+ allList:data
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ this.setData({
|
|
|
|
+ allList:[]
|
|
|
|
+ });
|
|
|
|
+ // my.alert({
|
|
|
|
+ // content:JSON.stringify(data.dataList)
|
|
|
|
+ // });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }).catch(e=>{
|
|
|
|
+ console.log(e);
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
toggleWashinGandnursing(e){
|
|
toggleWashinGandnursing(e){
|
|
|
|
|
|
let id=e.target.dataset.id;
|
|
let id=e.target.dataset.id;
|