首页刷新

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() { onShow() {
if (this.loadEndFlag) { if (this.loadEndFlag) {
this.codelist(); this.codelist();
}
this.getUserInfo(); this.getUserInfo();
}
// this.getGoods(true);
}, },
beforeDestroy() { beforeDestroy() {
@ -913,7 +914,6 @@
// //
codelist() { codelist() {
intention(this.where2).then(res => { intention(this.where2).then(res => {
this.codenote = res.data.list this.codenote = res.data.list
}) })
@ -1015,9 +1015,7 @@
formSubmit: function(e) { formSubmit: function(e) {
let that = this; let that = this;
if (that.validateForm() && that.validate) { if (that.validateForm() && that.validate) {
that.validate = false; that.validate = false;
intentionbus(that.merchantData).then(res => { intentionbus(that.merchantData).then(res => {
if (res.status == 200) { if (res.status == 200) {
this.isFshow = false; this.isFshow = false;
@ -1194,15 +1192,14 @@
byset() { byset() {
if (this.userid) { if (this.userid) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/product/basicSet?mer_id=' + this.userInfoData url: '/pages/product/basicSet?mer_id=' + this.userInfoData.service.mer_id
.service
.mer_id
}) })
} else { } else {
this.isAuto = true; this.isAuto = true;
this.isShowAuth = true this.isShowAuth = true
} }
}, },
// //
logout() { logout() {
// #ifdef H5 // #ifdef H5
@ -1238,7 +1235,6 @@
uni.navigateTo({ uni.navigateTo({
url: `/pages/store/home/index?id=` + this.userInfoData.service.mer_id url: `/pages/store/home/index?id=` + this.userInfoData.service.mer_id
}) })
} }
}, },
// //
@ -1630,20 +1626,21 @@
// //
getGoods: async function(isPage) { getGoods: async function(isPage) {
console.log(3123123123);
let that = this; let that = this;
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 (that.loadend) return; if (that.loadend) return;
if (that.loading) return; if (that.loading) return;
if (isPage === true) {
that.where.page = 1;
that.$set(that, 'productList', []);
}
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, that.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;
@ -1659,6 +1656,7 @@
that.loading = false; that.loading = false;
that.loadTitle = '加载更多'; that.loadTitle = '加载更多';
}); });
}
}, },
} }
} }