upload file

This commit is contained in:
2020-07-10 09:03:19 +08:00
parent 9ffdfa652a
commit a5b83f31a8
15 changed files with 183 additions and 84 deletions

View File

@@ -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--;