Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
zacharyzlj
Yz Music
提交
68020088
Y
Yz Music
项目概览
zacharyzlj
/
Yz Music
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
Yz Music
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
68020088
编写于
2月 22, 2021
作者:
Z
Zachary
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: add api port
上级
5486f43f
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
38 addition
and
12 deletion
+38
-12
src/api/album.js
src/api/album.js
+3
-0
src/api/index.js
src/api/index.js
+1
-0
src/api/mv.js
src/api/mv.js
+3
-0
src/api/other.js
src/api/other.js
+0
-2
src/api/playlist.js
src/api/playlist.js
+3
-0
src/api/user.js
src/api/user.js
+9
-0
src/common/apiHelper.js
src/common/apiHelper.js
+19
-10
未找到文件。
src/api/album.js
浏览文件 @
68020088
...
@@ -16,3 +16,6 @@ export const getAlbumDetail = id => requset.get(`/album/detail?id=${id}`);
...
@@ -16,3 +16,6 @@ export const getAlbumDetail = id => requset.get(`/album/detail?id=${id}`);
export
const
getTopAlbum
=
params
=>
export
const
getTopAlbum
=
params
=>
requset
.
get
(
"
/top/album
"
,
{
params
:
params
});
requset
.
get
(
"
/top/album
"
,
{
params
:
params
});
/* 登陆后使用 */
export
const
getCollectedAlbum
=
()
=>
requset
.
get
(
"
album/sublist
"
);
src/api/index.js
浏览文件 @
68020088
export
*
from
"
./login
"
;
export
*
from
"
./login
"
;
export
*
from
"
./user
"
;
export
*
from
"
./data
"
;
export
*
from
"
./data
"
;
export
*
from
"
./toplist
"
;
export
*
from
"
./toplist
"
;
export
*
from
"
./playlist
"
;
export
*
from
"
./playlist
"
;
...
...
src/api/mv.js
浏览文件 @
68020088
...
@@ -36,3 +36,6 @@ export const getAllMV = (limit, page, order, area, type) => {
...
@@ -36,3 +36,6 @@ export const getAllMV = (limit, page, order, area, type) => {
};
};
export
const
getMvDetail
=
id
=>
requset
.
get
(
`/mv/detail?mvid=
${
id
}
`
);
export
const
getMvDetail
=
id
=>
requset
.
get
(
`/mv/detail?mvid=
${
id
}
`
);
/* 登陆后使用 */
export
const
getCollectedMvs
=
()
=>
requset
.
get
(
"
/mv/sublist
"
);
src/api/other.js
浏览文件 @
68020088
import
{
requset
}
from
"
./base
"
;
import
{
requset
}
from
"
./base
"
;
export
const
getBanner
=
()
=>
requset
.
get
(
"
/banner?type=0
"
);
export
const
getBanner
=
()
=>
requset
.
get
(
"
/banner?type=0
"
);
export
const
getUserDetail
=
id
=>
requset
.
get
(
`/user/detail?uid=
${
id
}
`
);
src/api/playlist.js
浏览文件 @
68020088
...
@@ -21,3 +21,6 @@ export const getPlaylistDynamicDetial = id =>
...
@@ -21,3 +21,6 @@ export const getPlaylistDynamicDetial = id =>
// 获取歌单种类
// 获取歌单种类
export
const
getCatList
=
()
=>
requset
.
get
(
"
/playlist/catlist
"
);
export
const
getCatList
=
()
=>
requset
.
get
(
"
/playlist/catlist
"
);
/* 登陆后使用 */
export
const
getUserPlaylists
=
id
=>
requset
.
get
(
`/user/playlist?uid=
${
id
}
`
);
src/api/user.js
0 → 100644
浏览文件 @
68020088
import
{
requset
}
from
"
./base
"
;
export
const
getUserDetail
=
id
=>
requset
.
get
(
`/user/detail?uid=
${
id
}
`
);
/* 登陆后使用 */
export
const
getUserAccount
=
()
=>
requset
.
get
(
"
/user/account
"
);
/* 登陆后使用 */
export
const
getUserSubcount
=
()
=>
requset
.
get
(
"
/user/subcount
"
);
src/common/apiHelper.js
浏览文件 @
68020088
...
@@ -104,20 +104,29 @@ export function createMv(mv) {
...
@@ -104,20 +104,29 @@ export function createMv(mv) {
duration
,
duration
,
publishTime
,
publishTime
,
playCount
,
playCount
,
imgurl
imgurl
,
vid
,
title
,
coverUrl
,
creator
,
durationms
,
playTime
}
=
mv
;
}
=
mv
;
let
dt
=
duration
?
duration
:
durationms
;
let
times
=
playCount
?
playCount
:
playTime
;
let
c
=
artists
?
artists
:
creator
;
return
{
return
{
id
,
id
:
id
?
id
:
vid
,
name
,
name
:
name
?
name
:
title
,
img
:
cover
?
cover
:
imgurl
,
img
:
cover
?
cover
:
imgurl
?
imgurl
:
coverUrl
,
artists
,
artists
:
c
,
artistsText
:
genArtistisText
(
artists
),
artistsText
:
genArtistisText
(
c
),
duration
,
duration
:
dt
,
durationSecond
:
d
uration
/
1000
,
durationSecond
:
d
t
/
1000
,
durationText
:
formatTime
(
d
uration
/
1000
),
durationText
:
formatTime
(
d
t
/
1000
),
publishTime
,
publishTime
,
playCount
:
processCount
(
playCount
)
playCount
:
processCount
(
times
)
};
};
}
}
export
function
createMvs
(
mvs
)
{
export
function
createMvs
(
mvs
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录