"按上映年份"排序改为降序排序,从新到旧排序

This commit is contained in:
haiyangcui
2021-06-05 22:01:35 +02:00
parent 0816933679
commit 1e9f48e48c
3 changed files with 6 additions and 3 deletions

View File

@@ -510,7 +510,7 @@ export default {
switch (this.sortKeyword) {
case '按上映年份':
filteredData.sort(function (a, b) {
return a.year - b.year
return b.year - a.year
})
break
case '按片名':
@@ -524,6 +524,9 @@ export default {
})
break
default:
filteredData.sort(function (a, b) {
return new Date(b.last) - new Date(a.last)
})
break
}
if (this.showFind) {

View File

@@ -486,7 +486,7 @@ export default {
switch (this.sortKeyword) {
case '按上映年份':
filteredData.sort(function (a, b) {
return a.detail.year - b.detail.year
return b.detail.year - a.detail.year
})
break
case '按片名':

View File

@@ -324,7 +324,7 @@ export default {
switch (this.sortKeyword) {
case '按上映年份':
filteredData.sort(function (a, b) {
return a.detail.year - b.detail.year
return b.detail.year - a.detail.year
})
break
case '按片名':