upload file
This commit is contained in:
@@ -41,7 +41,7 @@ export default {
|
||||
orderList: [],
|
||||
loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
|
||||
page: 0,
|
||||
current: 0,
|
||||
current: Number,
|
||||
swiperCurrent: 0,
|
||||
swiperHeight: '',
|
||||
timer: true,
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
OrderItem
|
||||
},
|
||||
watch: {
|
||||
current() {
|
||||
current(value) {
|
||||
this.page = 0;
|
||||
this.getOrderList('again');
|
||||
},
|
||||
@@ -98,16 +98,16 @@ export default {
|
||||
if(reload) this.orderList = res.data;
|
||||
else this.orderList.push(...res.data);
|
||||
}
|
||||
return res.data.length;
|
||||
return res;
|
||||
},
|
||||
reachBottom() {
|
||||
if(!this.timer) return false;
|
||||
this.timer = false;
|
||||
this.loadStatus.splice(this.current, 1, "loading");
|
||||
this.page++;
|
||||
this.getOrderList.then(length => {
|
||||
this.getOrderList.then(res => {
|
||||
this.loadStatus.splice(this.current, 1, "nomore");
|
||||
if(length == 0) this.page--;
|
||||
if(res.data.length == 0) this.page--;
|
||||
}).catch(() => {
|
||||
this.loadStatus.splice(this.current, 1, "nomore");
|
||||
this.page--;
|
||||
|
||||
Reference in New Issue
Block a user