From 25fc03497f9b0a00ba0e6eb081d09fcda86e7018 Mon Sep 17 00:00:00 2001 From: zheng020 Date: Thu, 28 May 2026 12:27:03 +0800 Subject: [PATCH] feat: add hot inspiration flow API methods Add 3 API methods following existing patterns: - getHotInspirationFlowBatchApi() for batch fetching 4 categories - getHotInspirationFlowApi(type) for single category refresh - getHotInspirationFlowMoreApi(type, cursor, limit) for pagination Co-Authored-By: Claude Opus 4.7 --- frontend/utils/api.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/frontend/utils/api.js b/frontend/utils/api.js index a8f3c7c..87eac51 100644 --- a/frontend/utils/api.js +++ b/frontend/utils/api.js @@ -880,4 +880,32 @@ export function getEarningsSummaryApi() { url: '/api/v1/assets/me/earnings-summary', method: 'GET' }) +} + +// ==================== 热门灵感瀑布相关接口 ==================== + +// 批量获取热门分类(页面初始化用) +export function getHotInspirationFlowBatchApi() { + return request({ + url: '/api/v1/inspiration-flow/hot/batch', + method: 'GET' + }) +} + +// 单个分类刷新 +export function getHotInspirationFlowApi(type) { + return request({ + url: '/api/v1/inspiration-flow/hot', + method: 'GET', + data: { type } + }) +} + +// 查看更多分页 +export function getHotInspirationFlowMoreApi(type, cursor = '', limit = 20) { + return request({ + url: '/api/v1/inspiration-flow/hot/more', + method: 'GET', + data: { type, cursor, limit } + }) } \ No newline at end of file