@@ -91,7 +99,7 @@
detailEvent(site, row)"
@@ -309,7 +317,9 @@ export default {
searchGroups: [],
// 福利片关键词
r18KeyWords: ['伦理', '论理', '倫理', '福利', '激情', '理论', '写真', '情色', '美女', '街拍', '赤足', '性感', '里番'],
- searchViewMode: 'picture'
+ searchViewMode: 'picture',
+ areas: [],
+ selectedAreas: []
}
},
components: {
@@ -362,6 +372,11 @@ export default {
},
selectedClassName () {
return this.type.name + ' ' + this.list.length + '/' + this.recordcount
+ },
+ filteredList () {
+ var filteredData = this.list.filter(x => (this.selectedAreas.length === 0) || this.selectedAreas.includes(x.area))
+ filteredData = filteredData.filter(res => !setting.excludeR18Films || !this.containsR18Keywords(res.type))
+ return filteredData
}
},
filters: {
@@ -387,6 +402,9 @@ export default {
},
methods: {
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_VIDEO', 'SET_SHARE', 'SET_SETTING']),
+ getAreas () {
+ this.areas = [...new Set(this.list.map(ele => ele.area))].filter(x => x)
+ },
updateSearchViewMode () {
setting.find().then(res => {
res.searchViewMode = this.searchViewMode
@@ -453,6 +471,7 @@ export default {
this.pagecount = FILM_DATA_CACHE[cacheKey].pagecount
this.recordcount = FILM_DATA_CACHE[cacheKey].recordcount
this.list = FILM_DATA_CACHE[cacheKey].list
+ this.areas = FILM_DATA_CACHE[cacheKey].areas
} else {
zy.page(this.site.key, this.type.tid).then(res => {
this.pagecount = res.pagecount
@@ -522,12 +541,15 @@ export default {
if (this.$refs.filmWaterfall) {
this.$refs.filmWaterfall.refresh()
}
+ // 更新地区信息
+ this.getAreas()
// 更新缓存数据
const cacheKey = this.site.key + '@' + typeTid
FILM_DATA_CACHE[cacheKey] = {
pagecount: this.pagecount,
recordcount: this.recordcount,
- list: this.list
+ list: this.list,
+ areas: this.areas
}
}
})