|
@@ -1,4 +1,4 @@
|
|
|
-import { get, post } from '@/utils/request'
|
|
|
|
|
|
|
+import { get, post, delete0 } from '@/utils/request'
|
|
|
|
|
|
|
|
const videoApi = {
|
|
const videoApi = {
|
|
|
videoCategoryApi: '/api/content/video/category',
|
|
videoCategoryApi: '/api/content/video/category',
|
|
@@ -9,12 +9,14 @@ const videoApi = {
|
|
|
updateVideoFileApi: '/api/content/video/submit',
|
|
updateVideoFileApi: '/api/content/video/submit',
|
|
|
videoInfoApi: '/api/content/video/detail',
|
|
videoInfoApi: '/api/content/video/detail',
|
|
|
videoUrlApi: '/api/content/video/url',
|
|
videoUrlApi: '/api/content/video/url',
|
|
|
|
|
+ videoDownloadApi: '/api/content/video/download',
|
|
|
|
|
+ videoDeleteApi: '/api/content/video/delete',
|
|
|
|
|
|
|
|
videoRecommendApi: '/api/content/video/recommend',
|
|
videoRecommendApi: '/api/content/video/recommend',
|
|
|
similarVideoApi: '/api/content/video/similar',
|
|
similarVideoApi: '/api/content/video/similar',
|
|
|
videoPageApi: '/api/content/video/page',
|
|
videoPageApi: '/api/content/video/page',
|
|
|
videoTagApi: '/api/content/video/tag',
|
|
videoTagApi: '/api/content/video/tag',
|
|
|
- userVideoListApi: '/api/content/video/user',
|
|
|
|
|
|
|
+ userVideoPostApi: '/api/content/video/user',
|
|
|
hotVideoApi: '/api/content/video/hot',
|
|
hotVideoApi: '/api/content/video/hot',
|
|
|
userContentDataApi: '/api/content/userdata',
|
|
userContentDataApi: '/api/content/userdata',
|
|
|
playerRecordApi: '/api/media/video/play/record',
|
|
playerRecordApi: '/api/media/video/play/record',
|
|
@@ -62,6 +64,17 @@ export function videoUrl(videoId) {
|
|
|
return get(videoApi.videoUrlApi + '/' + videoId)
|
|
return get(videoApi.videoUrlApi + '/' + videoId)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 下载视频接口
|
|
|
|
|
+export function downloadVideo(videoId) {
|
|
|
|
|
+ return get(videoApi.videoDownloadApi + '/' + videoId)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 视频 URL 接口
|
|
|
|
|
+export function deleteVideo(videoId) {
|
|
|
|
|
+ return delete0(videoApi.videoDeleteApi + '/' + videoId)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/***********************************************************************************************************************/
|
|
|
// 视频推荐接口
|
|
// 视频推荐接口
|
|
|
export function videoRecommend(page) {
|
|
export function videoRecommend(page) {
|
|
|
return get(videoApi.videoRecommendApi + '/' + page)
|
|
return get(videoApi.videoRecommendApi + '/' + page)
|
|
@@ -90,7 +103,11 @@ export function submitPlayRecord(playerRecord) {
|
|
|
|
|
|
|
|
// 用户视频列表
|
|
// 用户视频列表
|
|
|
export function userVideoList(pageNumber, userId, lastId) {
|
|
export function userVideoList(pageNumber, userId, lastId) {
|
|
|
- return get(videoApi.userVideoListApi + '?pageNumber=' + pageNumber + '&userId=' + userId + '&lastId=' + lastId)
|
|
|
|
|
|
|
+ return get(videoApi.userVideoPostApi + '?pageNumber=' + pageNumber + '&userId=' + userId + '&lastId=' + lastId)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+export function userVideoPost(pageNumber) {
|
|
|
|
|
+ return get(videoApi.userVideoPostApi + '?pageNumber=' + pageNumber)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 用户最近投稿的视频
|
|
// 用户最近投稿的视频
|