添加'豆瓣冷门佳片'

This commit is contained in:
haiyangcui
2021-05-09 23:45:07 +02:00
parent 6f296a1170
commit 5509ace412

View File

@@ -166,7 +166,7 @@ export default {
filteredList: [],
// 不同推荐
recommendationsDefault: [],
recommendationTypes: ['作者推荐', '豆瓣热门电影', '豆瓣高分电影', '豆瓣热门剧集', '豆瓣热门美剧', '豆瓣热门英剧', '豆瓣热门国产剧', '豆瓣热门综艺', '豆瓣热门动漫', '豆瓣热门纪录片', '豆瓣热门动画电影'],
recommendationTypes: ['作者推荐', '豆瓣热门电影', '豆瓣高分电影', '豆瓣冷门佳片', '豆瓣热门剧集', '豆瓣热门美剧', '豆瓣热门英剧', '豆瓣热门国产剧', '豆瓣热门综艺', '豆瓣热门动漫', '豆瓣热门纪录片', '豆瓣热门动画电影'],
selectedRecommendationType: '作者推荐',
// Toolbar
showToolbar: false,
@@ -199,7 +199,9 @@ export default {
hotBritishTVSeriesPageStart: 0,
hotBritishTVSeries: [],
hotChineseTVSeriesPageStart: 0,
hotChineseTVSeries: []
hotChineseTVSeries: [],
goodButNotHotMoviesPageStart: 0,
goodButNotHotMovies: []
}
}
},
@@ -299,6 +301,9 @@ export default {
if (this.selectedRecommendationType === '豆瓣热门动画电影') {
this.recommendations = [...this.douban.hotCartonMovie]
}
if (this.selectedRecommendationType === '豆瓣冷门佳片') {
this.recommendations = [...this.douban.goodButNotHotMovies]
}
if (this.recommendations.length === 0) {
this.updateDoubanRecommendationsEvent()
}
@@ -350,6 +355,9 @@ export default {
if (this.selectedRecommendationType === '豆瓣热门动画电影') {
this.douban.hotCartonMovie.push(movie)
}
if (this.selectedRecommendationType === '豆瓣冷门佳片') {
this.douban.goodButNotHotMovies.push(movie)
}
},
searchAndCacheMovie (element) {
zy.searchFirstDetail(this.sites[0].key, element.title).then(detailRes => {
@@ -436,6 +444,10 @@ export default {
doubanUrl = `https://movie.douban.com/j/search_subjects?type=movie&tag=动画&sort=recommend&page_limit=${this.douban.page_limit}&page_start=${this.douban.hotCartonMoviePageStart}`
this.douban.hotCartonMoviePageStart = this.douban.hotCartonMoviePageStart + this.douban.page_limit
}
if (this.selectedRecommendationType === '豆瓣冷门佳片') {
doubanUrl = `https://movie.douban.com/j/search_subjects?type=movie&tag=冷门佳片&sort=recommend&page_limit=${this.douban.page_limit}&page_start=${this.douban.goodButNotHotMoviesPageStart}`
this.douban.goodButNotHotMoviesPageStart = this.douban.goodButNotHotMoviesPageStart + this.douban.page_limit
}
this.getRecommendationsDoubanMovieOrTV(doubanUrl)
},
toggleViewMode () {