Merge branch 'master' into xbx
This commit is contained in:
commit
fb3713093f
@ -46,7 +46,7 @@ export default {
|
|||||||
orderList: [],
|
orderList: [],
|
||||||
loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
|
loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
|
||||||
page: 0,
|
page: 0,
|
||||||
current: Number,
|
current: 0,
|
||||||
swiperCurrent: 0,
|
swiperCurrent: 0,
|
||||||
swiperHeight: '',
|
swiperHeight: '',
|
||||||
timer: true,
|
timer: true,
|
||||||
|
@ -52,7 +52,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async getBrowseList () {
|
async getBrowseList () {
|
||||||
const res = await this.$u.api.getBrowseList({ page: this.page });
|
const res = await this.$u.api.getBrowseList({ page: this.page });
|
||||||
this.timer = false;
|
this.timer = true;
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.historyList.push(...res.data.storeInfo);
|
this.historyList.push(...res.data.storeInfo);
|
||||||
}
|
}
|
||||||
@ -60,14 +60,15 @@ export default {
|
|||||||
},
|
},
|
||||||
reachBottom() {
|
reachBottom() {
|
||||||
if(!this.timer) return false;
|
if(!this.timer) return false;
|
||||||
|
this.timer = false;
|
||||||
this.loadStatus = "loading";
|
this.loadStatus = "loading";
|
||||||
this.page++;
|
this.page++;
|
||||||
this.getBrowseList({page: this.page}).then(length => {
|
this.getBrowseList().then(length => {
|
||||||
if(length == 0) {
|
if(length == 0) {
|
||||||
this.page--;
|
this.page--;
|
||||||
this.status = 'nomore';
|
this.loadStatus = 'nomore';
|
||||||
} else {
|
} else {
|
||||||
this.status = 'loading';
|
this.loadStatus = 'loading';
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loadStatus = "nomore";
|
this.loadStatus = "nomore";
|
||||||
|
Loading…
Reference in New Issue
Block a user