From 3cc41c3c340083b201fde1e4af7a05c3fe0a875e Mon Sep 17 00:00:00 2001 From: linxi Date: Wed, 27 Nov 2024 15:14:10 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A2711=20=E3=80=90=E9=9D=9E=E9=81=97?= =?UTF-8?q?=E6=96=87=E5=8C=96=E3=80=91=E9=9D=9E=E9=81=97=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=AF=B9=E8=BD=AE=E6=92=AD=E5=8C=BA=E5=9F=9F=E7=94=9F?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg_product/views/heritage/index.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkg_product/views/heritage/index.vue b/pkg_product/views/heritage/index.vue index 1e6bf8b..ca2fc5c 100644 --- a/pkg_product/views/heritage/index.vue +++ b/pkg_product/views/heritage/index.vue @@ -102,7 +102,8 @@ export default { contents: [], recommendList: [], keyword: '', - categoryId: '' + categoryId: '', + cacheList: [] } }, onLoad(opts) { @@ -112,11 +113,13 @@ export default { methods: { searchClick() { this.getRecommend() + this.contents = this.cacheList.filter(e => e.name.indexOf(this.keyword) > -1) }, getIchData() { getIch(this.id).then(res => { this.ichData = res.data - this.contents = res.data.categories[0] && res.data.categories[0].contents || [] + this.cacheList = res.data.categories[0] && res.data.categories[0].contents || [] + this.contents = this.cacheList this.categoryId = res.data.categories[0].ichCategoryId this.getRecommend() }) @@ -133,7 +136,8 @@ export default { }, handleTab(index, item) { this.actived = index - this.contents = item.contents + this.cacheList = item.contents + this.contents = this.cacheList this.categoryId = item.ichCategoryId this.getRecommend() },