|
|
@ -73,6 +73,8 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="load-more" @click="getOrderList">{{ hasMore ? '加载更多数据...' : '已加载完毕' }}</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
@ -90,7 +92,9 @@ |
|
|
return { |
|
|
return { |
|
|
accountInfo: {}, |
|
|
accountInfo: {}, |
|
|
queueList: [], |
|
|
queueList: [], |
|
|
orderList: [] |
|
|
|
|
|
|
|
|
orderList: [], |
|
|
|
|
|
hasMore: true, |
|
|
|
|
|
page: 0, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad() { |
|
|
onLoad() { |
|
|
@ -98,6 +102,9 @@ |
|
|
this.getQueueList(); |
|
|
this.getQueueList(); |
|
|
this.getOrderList(); |
|
|
this.getOrderList(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
onReachBottom() { |
|
|
|
|
|
this.getOrderList() |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
getAccountInfo() { |
|
|
getAccountInfo() { |
|
|
userAccountInfo().then(data => this.accountInfo = data) |
|
|
userAccountInfo().then(data => this.accountInfo = data) |
|
|
@ -111,10 +118,17 @@ |
|
|
}).then(data => this.queueList = data.list) |
|
|
}).then(data => this.queueList = data.list) |
|
|
}, |
|
|
}, |
|
|
getOrderList() { |
|
|
getOrderList() { |
|
|
|
|
|
if (!this.hasMore) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.page++ |
|
|
userOrderList({ |
|
|
userOrderList({ |
|
|
page: 1, |
|
|
|
|
|
page_size: 5 |
|
|
|
|
|
}).then(data => this.orderList = data.list) |
|
|
|
|
|
|
|
|
page: this.page, |
|
|
|
|
|
page_size: 15 |
|
|
|
|
|
}).then(data => { |
|
|
|
|
|
this.orderList = [...this.orderList, ...data.list] |
|
|
|
|
|
this.hasMore = data.has_more |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -391,4 +405,9 @@ |
|
|
border-bottom: 1rpx solid #eee; |
|
|
border-bottom: 1rpx solid #eee; |
|
|
padding-bottom: 30rpx; |
|
|
padding-bottom: 30rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.load-more { |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |