This commit is contained in:
jxxghp
2025-05-23 22:29:19 +08:00
parent 8efa5f7a28
commit ba13e6ac35

View File

@@ -115,14 +115,16 @@ async function loadExtraRecommendSources() {
try {
extraRecommendSources.value = await api.get('recommend/source')
if (extraRecommendSources.value.length > 0) {
viewList.push(
...extraRecommendSources.value.map(source => ({
apipath: source.api_path,
linkurl: `/browse/recommend/${source.api_path}?title=${source.name}`,
title: source.name,
type: source.type,
})),
)
extraRecommendSources.value.map(source => {
if (!viewList.some(item => item.apipath === source.api_path)) {
viewList.push({
apipath: source.api_path,
linkurl: `/browse/${source.api_path}&title=${source.name}`,
title: source.name,
type: source.type,
})
}
})
}
} catch (error) {
console.log(error)