forked from zhongyuanhaiju/uniapp
【增加】首页diy
This commit is contained in:
parent
ab8316cabb
commit
d5bdf7c2b9
|
|
@ -111,11 +111,17 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.changeCateIndex(this.value.list[0], 0, true);
|
||||
this.getData()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
changeCateIndex(item, index, isFirst) {
|
||||
switch (item.sources){
|
||||
case 'jianlou':
|
||||
this.getList()
|
||||
break;
|
||||
case 'point':
|
||||
this.getData()
|
||||
break;
|
||||
}
|
||||
this.cateIndex = index;
|
||||
this.goodsValue = {
|
||||
sources: item.sources,
|
||||
|
|
@ -182,6 +188,7 @@ export default {
|
|||
// mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
// if (mescroll.num == 1) this.goodsList = []; //如果是第一页需手动制空列表
|
||||
this.goodsList = []
|
||||
this.goodsList = this.goodsList.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
|
|
@ -225,6 +232,7 @@ export default {
|
|||
// this.list = []; //如果是第一页需手动制空列表
|
||||
// }
|
||||
|
||||
this.goodsList = []
|
||||
this.list = this.list.concat(res.data.list); //追加新数据
|
||||
// this.end_time = parseInt(res.data.end_time);
|
||||
// 开启倒计时
|
||||
|
|
|
|||
Loading…
Reference in New Issue