测试
This commit is contained in:
@@ -29,6 +29,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-colum" style="width: 100%;">
|
||||
<u-loadmore :status="form.status" />
|
||||
</view>
|
||||
<u-popup :show="clickconfirmshow" mode="center" :round="10">
|
||||
<view class="popupshow">
|
||||
<view class="Box_box flex-between">
|
||||
@@ -53,7 +56,12 @@
|
||||
data() {
|
||||
return {
|
||||
clickconfirmshow: false,
|
||||
is_end: false,
|
||||
list: [],
|
||||
form: {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
no: '',
|
||||
saveMerchantBaseInfolsit: {
|
||||
item: {
|
||||
@@ -128,8 +136,25 @@
|
||||
})
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.list = res.data
|
||||
if (res.data.length == 0) {
|
||||
this.is_end = true
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
this.form.page = ++this.form.page;
|
||||
setTimeout(() => {
|
||||
this.list = [...this.list, ...res.data];
|
||||
if (res.data.length == 10) {
|
||||
this.form.status = 'loading';
|
||||
} else {
|
||||
this.is_end = true;
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user