refactor(project): Reorganize frontend and backend directories

This commit is contained in:
2026-03-18 10:45:15 +08:00
parent cc9eaf4cdf
commit 92a139e470
513 changed files with 28251 additions and 287 deletions
@@ -0,0 +1,28 @@
import request from '@/utils/request.ts'
import type { Danmaku, DanmakuSendParams } from '@/types'
/**
* 弹幕相关 API
*/
export const danmakuApi = {
/**
* 发送弹幕
*/
sendDanmaku(params: DanmakuSendParams): Promise<Danmaku> {
return request.post('/content/danmaku', params)
},
/**
* 获取视频指定时间段的弹幕
*/
getDanmakuByTime(videoId: number, startTime: number, endTime: number): Promise<Danmaku[]> {
return request.get('/content/danmaku/time', { videoId, startTime, endTime })
},
/**
* 获取视频所有弹幕
*/
getAllDanmaku(videoId: number): Promise<Danmaku[]> {
return request.get(`/content/danmaku/all/${videoId}`)
}
}