mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-11-05 14:57:38 +08:00
Recommendations都是cuiocean一个人在维护,故将该资源转移到独立的repository里,避免继续污染本repo的commit信息
This commit is contained in:
@@ -232,15 +232,13 @@ export default {
|
||||
}
|
||||
},
|
||||
updateEvent () {
|
||||
const url = 'https://raw.githubusercontent.com/Hunlongyu/ZY-Player/master/src/lib/dexie/iniData/Recommendations.json'
|
||||
const url = 'https://raw.githubusercontent.com/cuiocean/ZY-Player-Resources/main/Recommendations/Recommendations.json'
|
||||
this.loading = true
|
||||
const axios = require('axios')
|
||||
axios.get(url).then(res => {
|
||||
if (res.status === 200) {
|
||||
if (res.data.length > 0) {
|
||||
this.recommendations = res.data.sort(function (a, b) {
|
||||
return b.detail.year - a.detail.year
|
||||
})
|
||||
this.recommendations = res.data
|
||||
recommendation.clear().then(recommendation.bulkAdd(this.recommendations))
|
||||
this.getFilterData()
|
||||
this.$message.success('更新推荐成功')
|
||||
|
||||
Reference in New Issue
Block a user