Commit 64a65226 authored by Smile's avatar Smile Committed by wux

bug197:(app/h5)首页-订单列表订单查询问题,请看截图,底部下拉无法翻页问题

parent 478a7c1b
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom",
"onReachBottomDistance": 50
} }
}, },
{ {
......
...@@ -268,6 +268,7 @@ export default { ...@@ -268,6 +268,7 @@ export default {
banner: [], banner: [],
orderData: [], orderData: [],
page: 1, page: 1,
pages:1,
isIdcard: false, isIdcard: false,
statusData: [], statusData: [],
name: {}, name: {},
...@@ -326,6 +327,12 @@ export default { ...@@ -326,6 +327,12 @@ export default {
this.getOrderData() this.getOrderData()
} }
}, },
onReachBottom() {
if(this.pages > this.page){
this.page ++
this.getOrderData()
}
},
methods: { methods: {
changeIndex(){ changeIndex(){
this.page = 1 this.page = 1
...@@ -606,7 +613,13 @@ export default { ...@@ -606,7 +613,13 @@ export default {
.get('/app-api/my/order/dynamic/page', { page: this.page, rows: 6 , searchKey: this.searchKey,statusList:this.config.status.value[this.config.status.index] }) .get('/app-api/my/order/dynamic/page', { page: this.page, rows: 6 , searchKey: this.searchKey,statusList:this.config.status.value[this.config.status.index] })
.then((res) => { .then((res) => {
if (res.code == 0 && res.data) { if (res.code == 0 && res.data) {
if (this.page == 1){
this.orderData = res.data.list this.orderData = res.data.list
this.pages = res.data.pages
}else {
this.orderData = this.orderData.concat(res.data.list)
}
} }
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment