From fc09a6b8955b9cd1fe5817869a065c1e052dd9ab Mon Sep 17 00:00:00 2001 From: lkddi Date: Fri, 27 Feb 2026 00:07:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9AloadWhispers=20?= =?UTF-8?q?=E5=8A=A0=20Accept:=20application/json=20header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 确保控制器返回 JSON 而不是 HTML 视图 - 解决名片弹窗查看私聊报网络异常的问题 --- resources/views/chat/frame.blade.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/views/chat/frame.blade.php b/resources/views/chat/frame.blade.php index adff3bb..dbac1f8 100644 --- a/resources/views/chat/frame.blade.php +++ b/resources/views/chat/frame.blade.php @@ -221,7 +221,9 @@ async loadWhispers() { try { - const res = await fetch('/command/whispers/' + encodeURIComponent(this.userInfo.username)); + const res = await fetch('/command/whispers/' + encodeURIComponent(this.userInfo.username), { + headers: { 'Accept': 'application/json' } + }); const data = await res.json(); if (data.status === 'success') { this.whisperList = data.messages;