提交 68020088 编写于 作者: Z Zachary

feat: add api port

上级 5486f43f
...@@ -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");
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";
......
...@@ -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");
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}`);
...@@ -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}`);
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");
...@@ -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: duration / 1000, durationSecond: dt / 1000,
durationText: formatTime(duration / 1000), durationText: formatTime(dt / 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.
先完成此消息的编辑!
想要评论请 注册