提交 bf368bab 编写于 作者: Z Zachary

feat: add new api methods

上级 eb0cf542
import axios from "axios";
const BASIC_URL = "http://zacharyzlj.cn:3000/";
//const BASIC_URL = "http://zacharyzlj.cn:3000/";
const BASIC_URL = "http://localhost:3000/";
function createBaseInstance() {
const instance = axios.create({ baseURL: BASIC_URL });
......
export const toplistTypes = {
NEW: 3779629,
SOAR: 19723756,
ORIGINAL: 2884035,
HOT: 3778678,
RB: 991319590
};
import { requset } from "./base";
export * from "./data";
export const getBanner = () => requset.get("/banner?type=0");
export const getSongers = (initial, type, area, page) => {
let offset = parseInt(page) - 1;
let limit = 80;
let offset = (parseInt(page) - 1) * limit;
let params = {
initial: initial,
type: type,
area: area,
limit: 80,
limit: limit,
offset: offset
};
return requset.get("/artist/list", { params: params });
};
export const getUserDetail = id => requset.get(`/user/detail?uid=${id}`);
export const getCatList = () => requset.get("(/playlist/catlist");
export const getPlayList = (limit, page, cat) => {
let order = "hot";
let offset = (parseInt(page) - 1) * limit;
let params = {
limit: limit,
offset: offset,
cat: cat,
order: order
};
return requset.get("/top/playlist", { params: params });
};
export const getTopList = toplistType =>
requset.get(`/top/list?id=${toplistType}`);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册