This commit is contained in:
jxxghp
2025-05-23 22:29:19 +08:00
parent 8efa5f7a28
commit ba13e6ac35
+7 -5
View File
@@ -115,14 +115,16 @@ async function loadExtraRecommendSources() {
try { try {
extraRecommendSources.value = await api.get('recommend/source') extraRecommendSources.value = await api.get('recommend/source')
if (extraRecommendSources.value.length > 0) { if (extraRecommendSources.value.length > 0) {
viewList.push( extraRecommendSources.value.map(source => {
...extraRecommendSources.value.map(source => ({ if (!viewList.some(item => item.apipath === source.api_path)) {
viewList.push({
apipath: source.api_path, apipath: source.api_path,
linkurl: `/browse/recommend/${source.api_path}?title=${source.name}`, linkurl: `/browse/${source.api_path}&title=${source.name}`,
title: source.name, title: source.name,
type: source.type, type: source.type,
})), })
) }
})
} }
} catch (error) { } catch (error) {
console.log(error) console.log(error)