首页刷新

This commit is contained in:
SK-20231103YIXF\Administrator 2024-05-13 23:40:45 +08:00
parent df9a67f164
commit 189a7000b9
1 changed files with 32 additions and 34 deletions

View File

@ -860,8 +860,9 @@
onShow() {
if (this.loadEndFlag) {
this.codelist();
this.getUserInfo();
}
this.getUserInfo();
// this.getGoods(true);
},
beforeDestroy() {
@ -913,7 +914,6 @@
//
codelist() {
intention(this.where2).then(res => {
this.codenote = res.data.list
})
@ -1015,9 +1015,7 @@
formSubmit: function(e) {
let that = this;
if (that.validateForm() && that.validate) {
that.validate = false;
intentionbus(that.merchantData).then(res => {
if (res.status == 200) {
this.isFshow = false;
@ -1194,15 +1192,14 @@
byset() {
if (this.userid) {
uni.navigateTo({
url: '/pages/product/basicSet?mer_id=' + this.userInfoData
.service
.mer_id
url: '/pages/product/basicSet?mer_id=' + this.userInfoData.service.mer_id
})
} else {
this.isAuto = true;
this.isShowAuth = true
}
},
//
logout() {
// #ifdef H5
@ -1238,7 +1235,6 @@
uni.navigateTo({
url: `/pages/store/home/index?id=` + this.userInfoData.service.mer_id
})
}
},
//
@ -1630,35 +1626,37 @@
//
getGoods: async function(isPage) {
console.log(3123123123);
let that = this;
if (that.loadend) return;
if (that.loading) return;
if (this.userInfoData.service && this.userInfoData.service.mer_id) {
if (isPage === true) {
that.loadend = false;
that.loading = false;
that.where.page = 1;
that.productList = [];
}
if (isPage === true) {
that.where.page = 1;
that.$set(that, 'productList', []);
if (that.loadend) return;
if (that.loading) return;
that.loading = true;
that.loadTitle = '';
await getOrderList(that.where, that.userInfoData.service.mer_id).then(res => {
let list = res.data.list;
let productList = that.$util.SplitArray(list, that.productList);
let loadend = list.length < that.where.limit;
that.loadend = loadend;
that.loading = false;
that.loadTitle = loadend ? '已全部加载' : '加载更多';
// setTimeout(() => {
that.$set(that, 'productList', productList);
// }, 500)
that.$set(that.where, 'page', that.where.page + 1);
if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true
}).catch(err => {
that.loading = false;
that.loadTitle = '加载更多';
});
}
that.loading = true;
that.loadTitle = '';
await getOrderList(that.where, this.userInfoData.service.mer_id).then(res => {
console.log(res);
let list = res.data.list;
let productList = that.$util.SplitArray(list, that.productList);
let loadend = list.length < that.where.limit;
that.loadend = loadend;
that.loading = false;
that.loadTitle = loadend ? '已全部加载' : '加载更多';
// setTimeout(() => {
that.$set(that, 'productList', productList);
// }, 500)
that.$set(that.where, 'page', that.where.page + 1);
if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true
}).catch(err => {
that.loading = false;
that.loadTitle = '加载更多';
});
},
}
}