首页刷新
This commit is contained in:
parent
df9a67f164
commit
189a7000b9
|
@ -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,35 +1626,37 @@
|
||||||
|
|
||||||
//获取订单列表
|
//获取订单列表
|
||||||
getGoods: async function(isPage) {
|
getGoods: async function(isPage) {
|
||||||
console.log(3123123123);
|
|
||||||
let that = this;
|
let that = this;
|
||||||
if (that.loadend) return;
|
if (this.userInfoData.service && this.userInfoData.service.mer_id) {
|
||||||
if (that.loading) return;
|
if (isPage === true) {
|
||||||
|
that.loadend = false;
|
||||||
|
that.loading = false;
|
||||||
|
that.where.page = 1;
|
||||||
|
that.productList = [];
|
||||||
|
}
|
||||||
|
|
||||||
if (isPage === true) {
|
if (that.loadend) return;
|
||||||
that.where.page = 1;
|
if (that.loading) return;
|
||||||
that.$set(that, 'productList', []);
|
|
||||||
|
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 = '加载更多';
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue