refactor(frontend): Rework home and video detail interactions
This commit is contained in:
@@ -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')
|
||||
},
|
||||
|
||||
/**
|
||||
* 增加评论数量(内部接口)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user