fix: 修复推荐页面外部推荐源URL参数拼接问题

This commit is contained in:
wumode
2025-07-23 20:12:36 +08:00
parent ac7c330e2f
commit 308ddfedea
+3 -1
View File
@@ -127,9 +127,11 @@ async function loadExtraRecommendSources() {
if (extraRecommendSources.value.length > 0) { if (extraRecommendSources.value.length > 0) {
extraRecommendSources.value.map(source => { extraRecommendSources.value.map(source => {
if (!viewList.some(item => item.apipath === source.api_path)) { if (!viewList.some(item => item.apipath === source.api_path)) {
const querySeparator = source.api_path.includes('?') ? '&' : '?';
const linkUrl = `/browse/${source.api_path}${querySeparator}title=${encodeURIComponent(source.name)}`;
viewList.push({ viewList.push({
apipath: source.api_path, apipath: source.api_path,
linkurl: `/browse/${source.api_path}&title=${source.name}`, linkurl: linkUrl,
title: source.name, title: source.name,
type: source.type, type: source.type,
}) })