|
@@ -64,7 +64,10 @@ Page({
|
|
*/
|
|
*/
|
|
onReachBottom: function () {
|
|
onReachBottom: function () {
|
|
if(this.data.requestState){
|
|
if(this.data.requestState){
|
|
- this.getOrderList(this,this.data.state,this.data.rows + 1)
|
|
|
|
|
|
+ this.setData({
|
|
|
|
+ rows: this.data.rows + 1
|
|
|
|
+ })
|
|
|
|
+ this.getOrderList(this,this.data.state,this.data.rows)
|
|
}
|
|
}
|
|
console.log('到底了')
|
|
console.log('到底了')
|
|
},
|
|
},
|
|
@@ -94,10 +97,14 @@ Page({
|
|
},
|
|
},
|
|
success(res){
|
|
success(res){
|
|
console.log(res,"orderList")
|
|
console.log(res,"orderList")
|
|
- orderList.push(...res.data)
|
|
|
|
- if(res.data.length < 10){
|
|
|
|
|
|
+ let data = res.data;
|
|
|
|
+ data.forEach(el=>{
|
|
|
|
+ el['imgArray'] = el.orderCustomGoodsList[0].customGoodsImg ? el.orderCustomGoodsList[0].customGoodsImg.split(',') : [];
|
|
|
|
+ })
|
|
|
|
+ orderList.push(...data)
|
|
|
|
+ if(res.data.length < 10 && rows !==1){
|
|
that.setData({
|
|
that.setData({
|
|
- requestState:false,
|
|
|
|
|
|
+ requestState:false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
that.setData({
|
|
that.setData({
|