From 7a3de9afba8e2f2c964fb7dac7c966f12a2c663f Mon Sep 17 00:00:00 2001 From: Jocay <1579649885@qq.com> Date: Sat, 10 Oct 2026 22:55:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20QQ=20=E9=9F=B3=E4=B9=90=E6=9C=AA?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=97=B6=E6=90=9C=E7=B4=A2=E7=BB=99=E5=87=BA?= =?UTF-8?q?=E6=98=8E=E7=A1=AE=E6=8F=90=E7=A4=BA=EF=BC=88=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AF=B9=E5=8C=BF=E5=90=8D=E8=AF=B7=E6=B1=82=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E7=A9=BA=E7=BB=93=E6=9E=9C=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- server/src/core/providers/qq/index.ts | 4 ++++ web/src/views/SearchView.vue | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/core/providers/qq/index.ts b/server/src/core/providers/qq/index.ts index 7ed1e0e..41775e9 100644 --- a/server/src/core/providers/qq/index.ts +++ b/server/src/core/providers/qq/index.ts @@ -101,6 +101,10 @@ export class QQProvider implements MusicProvider { param: { query: keyword, num_per_page: limit, page_num: page, search_type: 0 }, }); const list: any[] = data?.body?.song?.list || []; + // QQ 音乐搜索接口对未登录请求一律返回空结果 + if (!list.length && !this.client.auth) { + throw Object.assign(new Error('QQ 音乐搜索需要先登录(设置 → 扫码登录)'), { status: 400 }); + } return { items: list.map((t) => this.toSummary(t)), total: data?.meta?.sum ?? list.length, page, limit }; } diff --git a/web/src/views/SearchView.vue b/web/src/views/SearchView.vue index 00fa850..21f0724 100644 --- a/web/src/views/SearchView.vue +++ b/web/src/views/SearchView.vue @@ -110,7 +110,7 @@ const qqHint = computed(() => state.source === 'qq' && qqStatus.value && !qqStat

- QQ 音乐尚未登录,只能下载免费曲目。去导入 Cookie → + QQ 音乐尚未登录,搜索与下载都需要登录。去扫码登录 →