Skip to content

Commit

Permalink
修复排行榜详情顶部bug, 歌手详情代码改为hooks版
Browse files Browse the repository at this point in the history
  • Loading branch information
sanyuan0704 committed Aug 23, 2019
1 parent be07938 commit 9a89858
Show file tree
Hide file tree
Showing 9 changed files with 226 additions and 130 deletions.
2 changes: 1 addition & 1 deletion NeteaseCloudMusicApi
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<meta name="theme-color" content="#000000" />
<!--
manifest.json provides metadata used when your web app is installed on a
Expand Down
148 changes: 112 additions & 36 deletions src/api/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ const axiosInstance = axios.create({
});

axiosInstance.interceptors.response.use(
res => res.data,
res => res.data,
err => {
console.log(err, "网络错误");
}
);

export { axiosInstance };
export {
axiosInstance
};

//歌手种类
export const categoryTypes = [
{
export const categoryTypes = [{
name: "华语男",
key: "1001"
},
Expand Down Expand Up @@ -81,37 +82,114 @@ export const categoryTypes = [
];

//歌手首字母
export const alphaTypes = [
{ key: "A", name: "A" },
{ key: "B", name: "B" },
{ key: "C", name: "C" },
{ key: "D", name: "D" },
{ key: "E", name: "E" },
{ key: "F", name: "F" },
{ key: "G", name: "G" },
{ key: "H", name: "H" },
{ key: "I", name: "I" },
{ key: "J", name: "J" },
{ key: "K", name: "K" },
{ key: "L", name: "L" },
{ key: "M", name: "M" },
{ key: "N", name: "N" },
{ key: "O", name: "O" },
{ key: "P", name: "P" },
{ key: "Q", name: "Q" },
{ key: "R", name: "R" },
{ key: "S", name: "S" },
{ key: "T", name: "T" },
{ key: "U", name: "U" },
{ key: "V", name: "V" },
{ key: "W", name: "W" },
{ key: "X", name: "X" },
{ key: "Y", name: "Y" },
{ key: "Z", name: "Z" }
export const alphaTypes = [{
key: "A",
name: "A"
},
{
key: "B",
name: "B"
},
{
key: "C",
name: "C"
},
{
key: "D",
name: "D"
},
{
key: "E",
name: "E"
},
{
key: "F",
name: "F"
},
{
key: "G",
name: "G"
},
{
key: "H",
name: "H"
},
{
key: "I",
name: "I"
},
{
key: "J",
name: "J"
},
{
key: "K",
name: "K"
},
{
key: "L",
name: "L"
},
{
key: "M",
name: "M"
},
{
key: "N",
name: "N"
},
{
key: "O",
name: "O"
},
{
key: "P",
name: "P"
},
{
key: "Q",
name: "Q"
},
{
key: "R",
name: "R"
},
{
key: "S",
name: "S"
},
{
key: "T",
name: "T"
},
{
key: "U",
name: "U"
},
{
key: "V",
name: "V"
},
{
key: "W",
name: "W"
},
{
key: "X",
name: "X"
},
{
key: "Y",
name: "Y"
},
{
key: "Z",
name: "Z"
}
];

//排行榜编号
export const RankTypes = {
export const RankTypes = {
'0': '云音乐新歌榜',
'1': '云音乐热歌榜',
'2': '网易原创歌曲榜',
Expand All @@ -135,7 +213,7 @@ export const RankTypes = {
'20': '台湾Hito排行榜',
'21': 'Beatport全球电子舞曲榜',
'22': '云音乐ACG音乐榜',
'23': '江小白YOLO云音乐说唱榜'
'23': '江小白YOLO云音乐说唱榜'
}

//歌单一页限定歌曲数量
Expand All @@ -149,6 +227,4 @@ export const playMode = {
sequence: 0,
loop: 1,
random: 2
}


}
1 change: 0 additions & 1 deletion src/application/Rank/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export const Container = styled.div`
top: 90px;
bottom: ${props => props.play > 0?"60px": 0};
width: 100%;
overflow: hidden;
.offical,.global {
margin: 10px 5px;
padding-top: 15px;
Expand Down
Loading

0 comments on commit 9a89858

Please sign in to comment.