|
|
|
@ -53,7 +53,7 @@ Component({ |
|
|
|
} |
|
|
|
this.data.tabIndex = Number(detail.index) |
|
|
|
this.data.form.proviceId = area.list[this.data.tabIndex].data[this.data.pIndex].code |
|
|
|
this.setData({ pIndex: 0, proviceList: this.getProviceListByIndex(this.data.tabIndex) }) |
|
|
|
this.setData({ pIndex: 0, proviceList: this.getProviceListByIndex(this.data.tabIndex), orderList: [], ['form.pageNum']: 1, finished: false, loading: true }) |
|
|
|
this.fetchList() |
|
|
|
}, |
|
|
|
onProviceChange: function({ detail }){ |
|
|
|
@ -62,13 +62,13 @@ Component({ |
|
|
|
} |
|
|
|
this.data.pIndex = Number(detail.index) |
|
|
|
this.data.form.proviceId = area.list[this.data.tabIndex].data[this.data.pIndex].code |
|
|
|
this.fetchList() |
|
|
|
this.onRefreshList() |
|
|
|
}, |
|
|
|
onRefreshList: function(){ |
|
|
|
if (this.data.requesting) { |
|
|
|
return |
|
|
|
} |
|
|
|
this.setData({ orderList: [], ['form.pageNum']: 1, finished: false, requesting: true, loading: true }) |
|
|
|
this.setData({ orderList: [], ['form.pageNum']: 1, finished: false, loading: true }) |
|
|
|
this.fetchList() |
|
|
|
}, |
|
|
|
fetchList: function(){ |
|
|
|
@ -87,7 +87,6 @@ Component({ |
|
|
|
this.setData({ finished: true, requesting: false, loading: false }) |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
this.setData({ requesting: false, loading: false }) |
|
|
|
util.showToast(err) |
|
|
|
}) |
|
|
|
|