Fix:2649 【非遗文化】【推荐】没有根据类目的切换进行联动变更
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="heritage">
|
<view class="heritage">
|
||||||
<view class="search-top">
|
<view class="search-top">
|
||||||
<swiper class="swiper" disable-touch="true" touchable="false" :autoplay="ichData.banners.length > 1" :current="current">
|
<swiper class="swiper" disable-touch="true" touchable="false" :autoplay="ichData.banners && ichData.banners.length > 1" circular :current="current">
|
||||||
<swiper-item class="search-bg" v-for="(item, index) in ichData.banners" :key="index" @click="toDetails(item.ichContentId)">
|
<swiper-item class="search-bg" v-for="(item, index) in ichData.banners" :key="index" @click="toDetails(item.ichContentId)">
|
||||||
<image class="search-bg" :src="item.image" autoplay mode="aspectFit|aspectFill|widthFix" lazy-load="false"></image>
|
<image class="search-bg" :src="item.image" autoplay mode="aspectFit|aspectFill|widthFix" lazy-load="false"></image>
|
||||||
|
|
||||||
@@ -125,12 +125,15 @@ export default {
|
|||||||
keyword: this.keyword
|
keyword: this.keyword
|
||||||
}
|
}
|
||||||
getIchRecommend(params).then(res => {
|
getIchRecommend(params).then(res => {
|
||||||
this.recommendList = res.data || []
|
this.recommendList = res.data.filter(e => {
|
||||||
|
return this.contents.map(el => el.ichContentId).includes(e.id)
|
||||||
|
}) || []
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleTab(index, item) {
|
handleTab(index, item) {
|
||||||
this.actived = index
|
this.actived = index
|
||||||
this.contents = item.contents
|
this.contents = item.contents
|
||||||
|
this.getRecommend()
|
||||||
},
|
},
|
||||||
toDetails(id) {
|
toDetails(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|||||||
Reference in New Issue
Block a user