From d5bdf7c2b9f1e86287156aac2cdb81080adabaaa Mon Sep 17 00:00:00 2001 From: liqianjin <949671634@qq.com> Date: Fri, 3 Mar 2023 13:39:03 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E9=A6=96?= =?UTF-8?q?=E9=A1=B5diy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/diy-components/diy-many-goods-list.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/components/diy-components/diy-many-goods-list.vue b/components/diy-components/diy-many-goods-list.vue index 3f5adad..547869a 100644 --- a/components/diy-components/diy-many-goods-list.vue +++ b/components/diy-components/diy-many-goods-list.vue @@ -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); // 开启倒计时