商品切换优化
This commit is contained in:
parent
90295d897a
commit
46e61b6d39
@ -9,8 +9,8 @@ let httpApiThree
|
|||||||
// 网络接口修改此字符 小程序域名要求https
|
// 网络接口修改此字符 小程序域名要求https
|
||||||
// let httpApi = 'http://192.168.31.110:8324' // 测试
|
// let httpApi = 'http://192.168.31.110:8324' // 测试
|
||||||
if (process.env.NODE_ENV === "development") {
|
if (process.env.NODE_ENV === "development") {
|
||||||
// httpApi = "https://crmeb-test.shop.lihaink.cn"
|
httpApi = "https://crmeb-test.shop.lihaink.cn"
|
||||||
httpApi = "http://192.168.0.222"
|
// httpApi = "http://192.168.0.222"
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
httpApiTwo = "http://cms.com"
|
httpApiTwo = "http://cms.com"
|
||||||
httpApiThree = 'http://ceshi-oa.lihaink.cn'
|
httpApiThree = 'http://ceshi-oa.lihaink.cn'
|
||||||
|
@ -671,7 +671,7 @@
|
|||||||
order: '',
|
order: '',
|
||||||
keyword: '',
|
keyword: '',
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 30
|
limit: 10
|
||||||
};
|
};
|
||||||
this.getGoods();
|
this.getGoods();
|
||||||
break;
|
break;
|
||||||
@ -688,7 +688,6 @@
|
|||||||
this.getCoupon();
|
this.getCoupon();
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
this.loadTitle=''
|
|
||||||
this.getProductSpu()
|
this.getProductSpu()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -783,11 +782,14 @@
|
|||||||
let list = res.data.list;
|
let list = res.data.list;
|
||||||
let goodsList = that.$util.SplitArray(list, that.goods);
|
let goodsList = that.$util.SplitArray(list, that.goods);
|
||||||
let loadend = list.length < that.where.limit;
|
let loadend = list.length < that.where.limit;
|
||||||
|
console.log(list.length);
|
||||||
|
console.log(that.where.limit);
|
||||||
that.loadend = loadend;
|
that.loadend = loadend;
|
||||||
that.loading = false;
|
that.loading = false;
|
||||||
that.loadTitle = loadend ? '已全部加载' : '加载更多';
|
that.loadTitle = loadend ? '已全部加载' : '加载更多';
|
||||||
that.$set(that, 'goods', goodsList);
|
that.$set(that, 'goods', goodsList);
|
||||||
that.$set(that.where, 'page', that.where.page + 1);
|
that.$set(that.where, 'page', that.where.page + 1);
|
||||||
|
console.log(loadend);
|
||||||
console.log(that.loadTitle);
|
console.log(that.loadTitle);
|
||||||
console.log(that.loadend);
|
console.log(that.loadend);
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
@ -1146,13 +1148,15 @@
|
|||||||
// 商铺底部切换
|
// 商铺底部切换
|
||||||
tab: function(param) {
|
tab: function(param) {
|
||||||
if (this.tabActive == param) {
|
if (this.tabActive == param) {
|
||||||
|
console.log(123);
|
||||||
|
this.getProductSpu()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.goods = []
|
this.goods = []
|
||||||
this.where.page=1
|
this.where.page=1
|
||||||
this.tabActive = param;
|
|
||||||
console.log(this.goods);
|
|
||||||
this.goodsLoading = this.loadend = this.loading = false
|
this.goodsLoading = this.loadend = this.loading = false
|
||||||
|
this.tabActive = param;
|
||||||
|
// console.log(this.goods);
|
||||||
},
|
},
|
||||||
resetParmas() {
|
resetParmas() {
|
||||||
this.where = {
|
this.where = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user