|
|
|
@ -52,12 +52,13 @@ Scene({ |
|
|
|
this.setData({ orderList: [], ['form.pageNum']: 1, loading: true, finished: false }) |
|
|
|
this.fetchOrderList() |
|
|
|
}, |
|
|
|
fetchOrderList: function () { |
|
|
|
fetchOrderList: async function () { |
|
|
|
if (this.data.requesting || this.data.finished) { |
|
|
|
return |
|
|
|
} |
|
|
|
this.data.requesting = true |
|
|
|
getCarList(this.data.form).then(result => { |
|
|
|
try { |
|
|
|
var result = await getCarList(this.data.form) |
|
|
|
if (result.data && result.data.records && result.data.records.length) { |
|
|
|
var respList = result.data.records |
|
|
|
let nowList = `orderList[${this.data.orderList.length}]` |
|
|
|
@ -67,13 +68,12 @@ Scene({ |
|
|
|
} else { |
|
|
|
this.setData({ finished: true, requesting: false, loading: false }) |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
} catch (err) { |
|
|
|
this.setData({ requesting: false, loading: false }) |
|
|
|
util.showToast(err) |
|
|
|
}).then(() => { |
|
|
|
this.refresh = this.refresh || this.selectComponent('#refresh') |
|
|
|
this.refresh.setRefresh(false) |
|
|
|
}) |
|
|
|
} |
|
|
|
this.refresh = this.refresh || this.selectComponent('#refresh') |
|
|
|
this.refresh.setRefresh(false) |
|
|
|
}, |
|
|
|
lookItem: function (e) { |
|
|
|
if(e.currentTarget.dataset.page >= 0){ |
|
|
|
|