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. 获取投资计划列表