This commit is contained in:
1154079537 2024-05-13 18:32:53 +08:00
parent 8bb249a2b5
commit df9a67f164
1 changed files with 7 additions and 7 deletions

View File

@ -773,7 +773,7 @@
refundMark: false, refundMark: false,
where: { where: {
page: 1, page: 1,
limit: 3, limit: 10,
status: 9 status: 9
}, },
where1: { where1: {
@ -859,9 +859,9 @@
onShow() { onShow() {
if (this.loadEndFlag) { if (this.loadEndFlag) {
this.getUserInfo();
this.codelist(); this.codelist();
} }
this.getUserInfo();
}, },
beforeDestroy() { beforeDestroy() {
@ -1630,6 +1630,7 @@
// //
getGoods: async function(isPage) { getGoods: async function(isPage) {
console.log(3123123123);
let that = this; let that = this;
if (that.loadend) return; if (that.loadend) return;
if (that.loading) return; if (that.loading) return;
@ -1642,17 +1643,16 @@
that.loading = true; that.loading = true;
that.loadTitle = ''; that.loadTitle = '';
await getOrderList(that.where, this.userInfoData.service.mer_id).then(res => { await getOrderList(that.where, this.userInfoData.service.mer_id).then(res => {
console.log(res);
let list = res.data.list; let list = res.data.list;
let productList = that.$util.SplitArray(list, that.productList); let productList = that.$util.SplitArray(list, that.productList);
let loadend = list.length < that.where.limit; let loadend = list.length < that.where.limit;
that.loadend = loadend; that.loadend = loadend;
that.loading = false; that.loading = false;
that.loadTitle = loadend ? '已全部加载' : '加载更多'; that.loadTitle = loadend ? '已全部加载' : '加载更多';
setTimeout(() => { // setTimeout(() => {
that.$set(that, 'productList', productList); that.$set(that, 'productList', productList);
}, 500) // }, 500)
// console.log(that.productList)
that.$set(that.where, 'page', that.where.page + 1); that.$set(that.where, 'page', that.where.page + 1);
if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true
}).catch(err => { }).catch(err => {