refactor(frontend): Rework home and video detail interactions

This commit is contained in:
2026-04-24 17:35:13 +08:00
parent 833dd3451a
commit 59af57c0fa
38 changed files with 2693 additions and 986 deletions
@@ -7,6 +7,7 @@ import type {
VideoUploadParams,
VideoUploadResult,
PlayRecord,
PlayHistoryItem,
PageResult
} from '@/types'
@@ -134,6 +135,20 @@ export const videoApi = {
return request.post('/content/video/play', params)
},
/**
* 获取播放历史
*/
getPlayHistory(params?: { pageNum?: number; pageSize?: number }): Promise<PageResult<PlayHistoryItem>> {
return request.get('/content/video/history', params)
},
/**
* 清空播放历史
*/
clearPlayHistory(): Promise<void> {
return request.delete('/content/video/history')
},
/**
* 增加评论数量(内部接口)
*/