-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathvideo.js
58 lines (50 loc) · 1012 Bytes
/
video.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import axios from 'axios'
// 视频信息
export function getVideoInfo (bvid) {
const url = '/proxyApi/x/web-interface/view'
const data = {
'bvid': bvid
}
return axios.get(url, {
params: data
}).then(res => {
return Promise.resolve(res)
})
}
// 单个视频推荐信息
export function getRecommend (bvid) {
const url = '/proxyApi/x/web-interface/archive/related'
const data = {
'bvid': bvid
}
return axios.get(url, {
params: data
}).then(res => {
return Promise.resolve(res)
})
}
// 视频评论
export function getComment (aid) {
const url = '/proxyApi/x/v2/reply/main'
const data = {
'oid': aid,
'type': 1
}
return axios.get(url, {
params: data
}).then(res => {
return Promise.resolve(res)
})
}
// 视频标签
export function getTags (aid) {
const url = '/proxyApi/x/tag/archive/tags'
const data = {
'aid': aid
}
return axios.get(url, {
params: data
}).then(res => {
return Promise.resolve(res)
})
}