From 662d140439ff89ed4a2a838e7982749c4ede50fb Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Tue, 2 Dec 2025 17:25:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0mock=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mocks/handlers/account.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/mocks/handlers/account.js b/src/mocks/handlers/account.js index accdaee8..bc60c6b0 100644 --- a/src/mocks/handlers/account.js +++ b/src/mocks/handlers/account.js @@ -263,6 +263,26 @@ export const accountHandlers = [ }); }), + // 10. 获取事件帖子(用户发布的评论/帖子) + http.get('/api/account/events/posts', async () => { + await delay(NETWORK_DELAY); + + const currentUser = getCurrentUser(); + if (!currentUser) { + return HttpResponse.json( + { success: false, error: '未登录' }, + { status: 401 } + ); + } + + console.log('[Mock] 获取事件帖子'); + + return HttpResponse.json({ + success: true, + data: mockEventComments // 复用 mockEventComments 数据 + }); + }), + // ==================== 投资计划与复盘 ==================== // 10. 获取投资计划列表