商品切换优化

This commit is contained in:
THK3121 2023-06-02 10:14:59 +08:00
parent 90295d897a
commit 46e61b6d39
2 changed files with 10 additions and 6 deletions

View File

@ -9,8 +9,8 @@ let httpApiThree
// 网络接口修改此字符 小程序域名要求https
// let httpApi = 'http://192.168.31.110:8324' // 测试
if (process.env.NODE_ENV === "development") {
// httpApi = "https://crmeb-test.shop.lihaink.cn"
httpApi = "http://192.168.0.222"
httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = "http://192.168.0.222"
// #ifdef MP-WEIXIN
httpApiTwo = "http://cms.com"
httpApiThree = 'http://ceshi-oa.lihaink.cn'

View File

@ -671,7 +671,7 @@
order: '',
keyword: '',
page: 1,
limit: 30
limit: 10
};
this.getGoods();
break;
@ -688,7 +688,6 @@
this.getCoupon();
break;
case 7:
this.loadTitle=''
this.getProductSpu()
break;
}
@ -783,11 +782,14 @@
let list = res.data.list;
let goodsList = that.$util.SplitArray(list, that.goods);
let loadend = list.length < that.where.limit;
console.log(list.length);
console.log(that.where.limit);
that.loadend = loadend;
that.loading = false;
that.loadTitle = loadend ? '已全部加载' : '加载更多';
that.$set(that, 'goods', goodsList);
that.$set(that.where, 'page', that.where.page + 1);
console.log(loadend);
console.log(that.loadTitle);
console.log(that.loadend);
}).catch(err => {
@ -1146,13 +1148,15 @@
//
tab: function(param) {
if (this.tabActive == param) {
console.log(123);
this.getProductSpu()
return false;
}
this.goods = []
this.where.page=1
this.goodsLoading = this.loadend = this.loading = false
this.tabActive = param;
console.log(this.goods);
this.goodsLoading = this.loadend = this.loading = false
// console.log(this.goods);
},
resetParmas() {
this.where = {