|
|
@ -76,6 +76,13 @@ Component({ |
|
|
} else if(message.what == 888){ |
|
|
} else if(message.what == 888){ |
|
|
this.setData({ orderList: [], tabIndex: this.data.tabIndex, ['form.pageNum']: 1, loading: true, finished: false }) |
|
|
this.setData({ orderList: [], tabIndex: this.data.tabIndex, ['form.pageNum']: 1, loading: true, finished: false }) |
|
|
this.fetchPapersList() |
|
|
this.fetchPapersList() |
|
|
|
|
|
if(app.globalData.userInfo){ |
|
|
|
|
|
hasActivity().then(result => { |
|
|
|
|
|
this.setData({ hasActivity: result.data }) |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.setData({ hasActivity: false }) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
searchList: function(){ |
|
|
searchList: function(){ |
|
|
@ -127,7 +134,7 @@ Component({ |
|
|
if (this.data.requesting || this.data.finished) { |
|
|
if (this.data.requesting || this.data.finished) { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.setData({ requesting: true }) |
|
|
|
|
|
|
|
|
this.data.requesting = true |
|
|
getFactoryPrice(this.data.form).then(result => { |
|
|
getFactoryPrice(this.data.form).then(result => { |
|
|
if (result.data.records.length) { |
|
|
if (result.data.records.length) { |
|
|
var respList = result.data.records |
|
|
var respList = result.data.records |
|
|
@ -135,30 +142,14 @@ Component({ |
|
|
var num = result.data.current |
|
|
var num = result.data.current |
|
|
var finished = result.data.current >= result.data.pages |
|
|
var finished = result.data.current >= result.data.pages |
|
|
if (this.data.form.pageNum == 1) { |
|
|
if (this.data.form.pageNum == 1) { |
|
|
this.setData({ |
|
|
|
|
|
[nowList]: respList, |
|
|
|
|
|
total: result.data.total, |
|
|
|
|
|
['form.pageNum']: (num + 1), |
|
|
|
|
|
top: 0, |
|
|
|
|
|
finished, |
|
|
|
|
|
requesting: false, |
|
|
|
|
|
loading: false |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.setData({[nowList]: respList,total: result.data.total,['form.pageNum']: (num + 1),top: 0,finished,requesting: false,loading: false}) |
|
|
} else { |
|
|
} else { |
|
|
this.setData({ |
|
|
|
|
|
[nowList]: respList, |
|
|
|
|
|
total: result.data.total, |
|
|
|
|
|
['form.pageNum']: (num + 1), |
|
|
|
|
|
finished, |
|
|
|
|
|
requesting: false, |
|
|
|
|
|
loading: false |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.setData({ [nowList]: respList, total: result.data.total, ['form.pageNum']: (num + 1), finished, requesting: false, loading: false }) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.setData({ requesting: false, finished: true, loading: false, }) |
|
|
this.setData({ requesting: false, finished: true, loading: false, }) |
|
|
} |
|
|
} |
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|
//异常回调
|
|
|
|
|
|
this.setData({ requesting: false, finished: true, loading: false, }) |
|
|
this.setData({ requesting: false, finished: true, loading: false, }) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|