Fix:2711 【非遗文化】非遗列表页面搜索功能需要对轮播区域生效
This commit is contained in:
@@ -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()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user