|
|
|
@ -28,7 +28,8 @@ Component({ |
|
|
|
momentList: [], |
|
|
|
tabList: [], |
|
|
|
tabIndex: 0, |
|
|
|
requesting: true, |
|
|
|
loading: true, |
|
|
|
requesting: false, |
|
|
|
form : {sortBy: 0, pageNum: 1, pageSize: 10, categoryId: '', cityId: ''}, |
|
|
|
orderList: [], |
|
|
|
popover: false, |
|
|
|
@ -66,7 +67,13 @@ Component({ |
|
|
|
} |
|
|
|
this.data.form.categoryId = typeList[0].categoryId |
|
|
|
this.setData({ tabList }) |
|
|
|
if(!this.data.orderList.length){ |
|
|
|
this.fetchAgentList() |
|
|
|
} |
|
|
|
}) |
|
|
|
if(app.nowCity && app.nowCity.cityCode){ |
|
|
|
this.setData({ cityName: app.nowCity.cityName, ['form.cityId']: app.nowCity.cityCode }) |
|
|
|
} |
|
|
|
} |
|
|
|
this.initLogin() |
|
|
|
this.data.firstShow = true |
|
|
|
@ -176,12 +183,12 @@ Component({ |
|
|
|
this.setData({ requesting: true, orderList: [] }) |
|
|
|
getMomentList(this.data.form).then(result => { |
|
|
|
if (result.data.records.length) { |
|
|
|
this.setData({ orderList: result.data.records, requesting: false }) |
|
|
|
this.setData({ orderList: result.data.records, requesting: false, loading: false }) |
|
|
|
} else { |
|
|
|
this.setData({ requesting: false }) |
|
|
|
this.setData({ requesting: false, loading: false }) |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
this.setData({ requesting: false }) |
|
|
|
this.setData({ requesting: false, loading: false }) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|