├── .gitignore
├── LICENSE
├── README.md
├── babel.config.js
├── package-lock.json
├── package.json
├── public
├── favicon.ico
├── index.html
└── screenshot
│ ├── MV详情.png
│ ├── 专辑详情.png
│ ├── 发现音乐.png
│ ├── 推荐歌单.png
│ ├── 搜索结果.png
│ ├── 播放列表.png
│ ├── 最新MV.png
│ ├── 最新音乐.png
│ ├── 歌单详情.png
│ ├── 歌手详情.png
│ ├── 歌词详情.png
│ └── 热搜榜.png
├── src
├── App.vue
├── assets
│ ├── common
│ │ └── tab.css
│ ├── icon
│ │ ├── iconfont.css
│ │ ├── iconfont.json
│ │ └── iconfont.ttf
│ ├── imgs
│ │ ├── 1.jpg
│ │ ├── 2.jpg
│ │ ├── 3.jpg
│ │ ├── 4.jpg
│ │ ├── 5.jpg
│ │ ├── 6.jpg
│ │ ├── 7.jpg
│ │ ├── 8.jpg
│ │ ├── defaultImg.png
│ │ ├── loading.png
│ │ ├── musicDemo.jpg
│ │ ├── mvDemo.jpg
│ │ └── player_bar.png
│ └── logo.png
├── components
│ ├── AudioChen.vue
│ ├── Bottom.vue
│ ├── Index.vue
│ ├── Pagination.vue
│ ├── Queue.vue
│ ├── SongDetail.vue
│ └── Top.vue
├── main.js
├── router
│ └── index.js
├── store
│ ├── index.js
│ └── mutation.js
├── utils
│ ├── api.js
│ ├── request.js
│ └── utils.js
└── views
│ ├── Album
│ └── Album.vue
│ ├── Artist
│ └── Artist.vue
│ ├── Discover
│ └── Discover.vue
│ ├── MVs
│ └── MVs.vue
│ ├── MvDetail
│ └── MvDetail.vue
│ ├── NewSongs
│ └── NewSongs.vue
│ ├── Playlist
│ └── Playlist.vue
│ ├── Recommend
│ └── Recommend.vue
│ └── Result
│ └── Result.vue
└── vue.config.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 MrRainbowYoo
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 小陈音乐播放器
2 |
3 | ## 💬前言
4 | 一款在线音乐播放器,是我个人练手的小项目,使用Vue2全家桶编写,部分UI风格参考**网易云音乐**。目前暂未做移动端适配。
5 |
6 | 路过的朋友们麻烦点个 "⭐Star" ~
7 |
8 | > 请使用PC访问 **[在线演示](http://duoduozuikeail.top/)** (最好用Chrome)
9 |
10 | ## 💪网易云音乐NodeJS版API
11 | > 感谢开源项目 *NeteaseCloudMusicApi* 提供的支持
12 | > [Github地址](https://github.com/Binaryify/NeteaseCloudMusicApi)
13 | > [使用文档](https://binaryify.github.io/NeteaseCloudMusicApi/#/)
14 |
15 | ## 👉技术栈
16 | - Vue
17 | - Vue Cli
18 | - Vue Router
19 | - Vuex
20 | - ElementUI
21 | - Axios
22 |
23 | ## 🚩运行项目
24 | #### 后端
25 | # 克隆项目到本地
26 | git clone https://github.com/Binaryify/NeteaseCloudMusicApi.git
27 |
28 | # 进入项目文件夹
29 | cd NeteaseCloudMusicApi
30 |
31 | # 安装依赖
32 | npm install
33 |
34 | # 启动项目(默认3000端口)
35 | node app.js
36 | #### 本项目
37 | # 克隆项目到本地
38 | git clone https://github.com/MrRainbowYoo/Music_Player.git
39 |
40 | # 进入项目文件夹
41 | cd Music_Player
42 |
43 | # 安装依赖
44 | npm install
45 |
46 | # 启动项目
47 | npm run serve
48 |
49 |
50 | ## 🚀功能列表
51 | - [x] 音乐播放/暂停/下一首/上一首
52 | - [x] 进度条控制
53 | - [x] 音量调节
54 | - [x] 推荐歌单
55 | - [x] 最新音乐
56 | - [x] 推荐MV
57 | - [x] MV播放
58 | - [x] 自动切换下一首
59 | - [x] 列表循环播放
60 | - [x] 播放列表
61 | - [x] 模糊搜索
62 | - [x] 热搜榜
63 | - [x] 搜索历史
64 | - [x] 歌词滚动
65 | - [x] 歌单/专辑/歌手详情
66 | - [x] 查看评论
67 | - [ ] 快捷键操作
68 | - [ ] 用户登录
69 | - [ ] 收藏歌单
70 |
71 | ## 💻部分页面截图
72 |
73 | **发现音乐**
74 | [](https://imgtu.com/i/WT09sA)
75 |
76 | **推荐歌单**
77 | [](https://imgtu.com/i/WT0CqI)
78 |
79 | **最新音乐**
80 | [](https://imgtu.com/i/WT0kIf)
81 |
82 | **最新MV**
83 | [](https://imgtu.com/i/WT0iZt)
84 |
85 | **搜索结果**
86 | [](https://imgtu.com/i/WTwxRe)
87 |
88 | **歌词详情**
89 | [](https://imgtu.com/i/WT0ZRg)
90 |
91 | **播放列表**
92 | [](https://imgtu.com/i/WT0FdP)
93 |
94 | **MV详情**
95 | [](https://imgtu.com/i/WT0Ei8)
96 |
97 | **歌手详情**
98 | [](https://imgtu.com/i/WT0pMd)
99 |
100 |
102 |
103 | **其他界面**
104 | | 歌单详情 | 专辑详情 |
105 | | ------- | ----- |
106 | | [](https://imgtu.com/i/WT0ezQ) | [](https://imgtu.com/i/WTwzxH) |
107 |
108 | ## 📆历史版本
109 | #### V1.0.0 (2021年7月28日)
110 | - 正式版发布
111 |
112 | ## 📣结语
113 | 本项目音视频文件来自各网站接口,不会修改任何音视频文件。
114 |
115 | 本项目仅为个人前端练手项目。本站音频版权来自各网站,只提供数据查询服务,不提供任何音频存储和贩卖服务。
116 |
117 | 请勿用作商业用途,请勿通过本项目下载盗版歌曲资源,否则后果自负!
118 |
119 | **正常使用请选择[网易云音乐官方客户端](https://music.163.com/)**
120 |
121 | ## 📝License
122 | [MIT](LICENSE)
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "musicplayer",
3 | "version": "1.0.0",
4 | "private": true,
5 | "description": "a music player developed by Vue",
6 | "author": "xiaochen",
7 | "scripts": {
8 | "serve": "vue-cli-service serve",
9 | "build": "vue-cli-service build",
10 | "lint": "vue-cli-service lint"
11 | },
12 | "dependencies": {
13 | "axios": "^0.21.1",
14 | "colorthief": "^2.3.2",
15 | "core-js": "^3.6.5",
16 | "el-table-infinite-scroll": "^1.0.10",
17 | "element-ui": "^2.15.2",
18 | "vue": "^2.6.11",
19 | "vue-lazyload": "^1.3.3",
20 | "vue-router": "^3.5.1",
21 | "vuex": "^3.6.2"
22 | },
23 | "devDependencies": {
24 | "@vue/cli-plugin-babel": "~4.5.0",
25 | "@vue/cli-plugin-eslint": "~4.5.0",
26 | "@vue/cli-service": "~4.5.0",
27 | "babel-eslint": "^10.1.0",
28 | "eslint": "^6.7.2",
29 | "eslint-plugin-vue": "^6.2.2",
30 | "vue-template-compiler": "^2.6.11"
31 | },
32 | "eslintConfig": {
33 | "root": true,
34 | "env": {
35 | "node": true
36 | },
37 | "extends": [
38 | "plugin:vue/essential",
39 | "eslint:recommended"
40 | ],
41 | "parserOptions": {
42 | "parser": "babel-eslint"
43 | },
44 | "rules": {}
45 | },
46 | "browserslist": [
47 | "> 1%",
48 | "last 2 versions",
49 | "not dead"
50 | ]
51 | }
52 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 小陈音乐
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/public/screenshot/MV详情.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/public/screenshot/MV详情.png
--------------------------------------------------------------------------------
/public/screenshot/专辑详情.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/public/screenshot/专辑详情.png
--------------------------------------------------------------------------------
/public/screenshot/发现音乐.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/public/screenshot/发现音乐.png
--------------------------------------------------------------------------------
/public/screenshot/推荐歌单.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/public/screenshot/推荐歌单.png
--------------------------------------------------------------------------------
/public/screenshot/搜索结果.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/public/screenshot/搜索结果.png
--------------------------------------------------------------------------------
/public/screenshot/播放列表.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/public/screenshot/播放列表.png
--------------------------------------------------------------------------------
/public/screenshot/最新MV.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/public/screenshot/最新MV.png
--------------------------------------------------------------------------------
/public/screenshot/最新音乐.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/public/screenshot/最新音乐.png
--------------------------------------------------------------------------------
/public/screenshot/歌单详情.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/public/screenshot/歌单详情.png
--------------------------------------------------------------------------------
/public/screenshot/歌手详情.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/public/screenshot/歌手详情.png
--------------------------------------------------------------------------------
/public/screenshot/歌词详情.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/public/screenshot/歌词详情.png
--------------------------------------------------------------------------------
/public/screenshot/热搜榜.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/public/screenshot/热搜榜.png
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
45 |
46 |
99 |
--------------------------------------------------------------------------------
/src/assets/common/tab.css:
--------------------------------------------------------------------------------
1 | .songs-table .el-table__row:hover .plus{
2 | display: block;
3 | }
4 |
5 | .el-tabs__active-bar {
6 | background-color: rgb(236, 65, 65) !important;
7 | }
8 |
9 | .el-tabs__item.is-active {
10 | color: rgb(236, 65, 65) !important;
11 | }
12 |
13 | .el-tabs__item:not(.is-active):hover {
14 | color: rgba(236, 65, 65, 0.555) !important;
15 | }
--------------------------------------------------------------------------------
/src/assets/icon/iconfont.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: "iconfont"; /* Project id */
3 | src: url('iconfont.ttf?t=1625120574940') format('truetype');
4 | }
5 |
6 | .iconfont {
7 | font-family: "iconfont" !important;
8 | /*font-size: 16px;*/
9 | font-style: normal;
10 | -webkit-font-smoothing: antialiased;
11 | -moz-osx-font-smoothing: grayscale;
12 | }
13 |
14 | .icon-jingyin:before {
15 | content: "\e65e";
16 | }
17 |
18 | .icon-yinliang:before {
19 | content: "\e662";
20 | }
21 |
22 | .icon-dianzan:before {
23 | content: "\e63b";
24 | }
25 |
26 | .icon-music:before {
27 | content: "\e617";
28 | }
29 |
30 | .icon-yinle:before {
31 | content: "\e609";
32 | }
33 |
34 | .icon-shangyishou:before {
35 | content: "\e63c";
36 | }
37 |
38 | .icon-xiayishou:before {
39 | content: "\e63e";
40 | }
41 |
42 | .icon-yinleliebiao-:before {
43 | content: "\e60f";
44 | }
45 |
46 | .icon-yinfu:before {
47 | content: "\e604";
48 | }
49 |
50 | .icon-zanting:before {
51 | content: "\e887";
52 | }
53 |
54 | .icon-bofangMV:before {
55 | content: "\e6a3";
56 | }
57 |
58 | .icon-yinleliebiao:before {
59 | content: "\e7fe";
60 | }
61 |
62 | .icon-pause:before {
63 | content: "\e664";
64 | }
65 |
66 | .icon-play:before {
67 | content: "\e665";
68 | }
69 |
70 | .icon-lajitong:before {
71 | content: "\e76e";
72 | }
73 |
74 |
--------------------------------------------------------------------------------
/src/assets/icon/iconfont.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "",
3 | "name": "",
4 | "font_family": "iconfont",
5 | "css_prefix_text": "icon-",
6 | "description": "",
7 | "glyphs": [
8 | {
9 | "icon_id": "807273",
10 | "name": "静音",
11 | "font_class": "jingyin",
12 | "unicode": "e65e",
13 | "unicode_decimal": 58974
14 | },
15 | {
16 | "icon_id": "807277",
17 | "name": "音量",
18 | "font_class": "yinliang",
19 | "unicode": "e662",
20 | "unicode_decimal": 58978
21 | },
22 | {
23 | "icon_id": "1703514",
24 | "name": "点赞",
25 | "font_class": "dianzan",
26 | "unicode": "e63b",
27 | "unicode_decimal": 58939
28 | },
29 | {
30 | "icon_id": "3878673",
31 | "name": "音乐",
32 | "font_class": "music",
33 | "unicode": "e617",
34 | "unicode_decimal": 58903
35 | },
36 | {
37 | "icon_id": "4608957",
38 | "name": "音乐",
39 | "font_class": "yinle",
40 | "unicode": "e609",
41 | "unicode_decimal": 58889
42 | },
43 | {
44 | "icon_id": "8341784",
45 | "name": "上一首",
46 | "font_class": "shangyishou",
47 | "unicode": "e63c",
48 | "unicode_decimal": 58940
49 | },
50 | {
51 | "icon_id": "8341786",
52 | "name": "下一首",
53 | "font_class": "xiayishou",
54 | "unicode": "e63e",
55 | "unicode_decimal": 58942
56 | },
57 | {
58 | "icon_id": "11428241",
59 | "name": "音乐列表-01",
60 | "font_class": "yinleliebiao-",
61 | "unicode": "e60f",
62 | "unicode_decimal": 58895
63 | },
64 | {
65 | "icon_id": "15056495",
66 | "name": "音符",
67 | "font_class": "yinfu",
68 | "unicode": "e604",
69 | "unicode_decimal": 58884
70 | },
71 | {
72 | "icon_id": "17782644",
73 | "name": "暂停",
74 | "font_class": "zanting",
75 | "unicode": "e887",
76 | "unicode_decimal": 59527
77 | },
78 | {
79 | "icon_id": "18965598",
80 | "name": "播放MV",
81 | "font_class": "bofangMV",
82 | "unicode": "e6a3",
83 | "unicode_decimal": 59043
84 | },
85 | {
86 | "icon_id": "19654124",
87 | "name": "音乐列表",
88 | "font_class": "yinleliebiao",
89 | "unicode": "e7fe",
90 | "unicode_decimal": 59390
91 | },
92 | {
93 | "icon_id": "19663518",
94 | "name": "暂停",
95 | "font_class": "pause",
96 | "unicode": "e664",
97 | "unicode_decimal": 58980
98 | },
99 | {
100 | "icon_id": "19663520",
101 | "name": "播放",
102 | "font_class": "play",
103 | "unicode": "e665",
104 | "unicode_decimal": 58981
105 | },
106 | {
107 | "icon_id": "21777665",
108 | "name": "垃圾桶",
109 | "font_class": "lajitong",
110 | "unicode": "e76e",
111 | "unicode_decimal": 59246
112 | }
113 | ]
114 | }
115 |
--------------------------------------------------------------------------------
/src/assets/icon/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/src/assets/icon/iconfont.ttf
--------------------------------------------------------------------------------
/src/assets/imgs/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/src/assets/imgs/1.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/src/assets/imgs/2.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/src/assets/imgs/3.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/src/assets/imgs/4.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/src/assets/imgs/5.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/src/assets/imgs/6.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/src/assets/imgs/7.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/src/assets/imgs/8.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/defaultImg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/src/assets/imgs/defaultImg.png
--------------------------------------------------------------------------------
/src/assets/imgs/loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/src/assets/imgs/loading.png
--------------------------------------------------------------------------------
/src/assets/imgs/musicDemo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/src/assets/imgs/musicDemo.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/mvDemo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/src/assets/imgs/mvDemo.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/player_bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/src/assets/imgs/player_bar.png
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrRainbowYoo/Music_Player/766ee81612a5b4d8818e8d4b6b41ba2d46a2918c/src/assets/logo.png
--------------------------------------------------------------------------------
/src/components/AudioChen.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
{{currentTime | timeFormat}}
24 |
25 |
33 |
34 |
{{duration | timeFormat}}
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
165 |
166 |
--------------------------------------------------------------------------------
/src/components/Bottom.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
![]()
7 |
8 |
9 |
{{globalMusicInfo.songName}}
10 |
11 |
12 | {{singer.name}}
13 |
14 |
15 |
还没有播放音乐哦
16 |
17 |
18 |
19 |
20 |
21 |
22 |
29 |
30 | {{musicQueue.length}}
31 |
32 |
33 |
34 |
35 |
36 |
37 |
186 |
187 |
--------------------------------------------------------------------------------
/src/components/Index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | -
6 | 发现音乐
7 |
8 | -
9 | 推荐歌单
10 |
11 |
14 | -
15 | 最新MV
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
36 |
37 |
--------------------------------------------------------------------------------
/src/components/Pagination.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
14 |
27 |
28 |
--------------------------------------------------------------------------------
/src/components/Queue.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 共{{musicQueue.length}}首
8 | 清空列表
9 |
10 |
11 |
12 | -
13 |
18 |
19 | {{item.songName}}
20 |
21 |
22 | {{singer.name}}
23 |
24 |
25 | {{item.duration}}
26 | ×
27 |
28 |
29 |
30 |
31 |
32 |
33 |
什么都没有~快去听歌吧
34 |
35 |
36 |
37 |
38 |
208 |
209 |
--------------------------------------------------------------------------------
/src/components/SongDetail.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
![]()
8 |
9 |
![]()
10 |
11 |
12 |
13 |
14 |
{{globalMusicInfo.songName}}
15 |
16 | {{singer.name}}
17 |
18 |
19 |
20 | {{item.lyricWords}}
21 |
22 |
抱歉,暂无歌词
23 |
24 |
25 |
26 |
29 |
30 |
31 |
32 |
33 |
162 |
163 |
--------------------------------------------------------------------------------
/src/components/Top.vue:
--------------------------------------------------------------------------------
1 |
2 |
51 |
52 |
53 |
124 |
125 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 | import ElementUI from "element-ui"
4 | import 'element-ui/lib/theme-chalk/index.css'
5 | import "./assets/icon/iconfont.css"
6 | import router from './router'
7 | import store from './store'
8 | import Vuelazyload from 'vue-lazyload'
9 |
10 | Vue.config.productionTip = false
11 |
12 | Vue.use(ElementUI)
13 |
14 | Vue.use(Vuelazyload,{
15 | preLoad:1.3,
16 | loading: require('./assets/imgs/loading.png'),
17 | attempt:2
18 | })
19 |
20 | console.log = function(){}
21 |
22 | console.info(`%c
23 | 欢迎使用小陈音乐!
24 | 作者:小陈同学吗
25 | GitHub:https://github.com/MrRainbowYoo/Music_Player
26 | 歌曲来源于网易云音乐(https://music.163.com)
27 | * 本项目仅供个人学习研究使用,禁止用于商业或非法用途。`,`color:#2980b9`)
28 |
29 | new Vue({
30 | router,
31 | store,
32 | render: h => h(App)
33 | }).$mount('#app')
34 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import VueRouter from "vue-router"
3 |
4 | Vue.use(VueRouter)
5 |
6 | // 解决重复点击导航时,控制台出现报错
7 | const VueRouterPush = VueRouter.prototype.push;
8 | VueRouter.prototype.push = function push(to) {
9 | return VueRouterPush.call(this, to).catch(err => err)
10 | }
11 |
12 | const routes = [
13 | {
14 | path:"/",
15 | redirect:'/discover'
16 | },
17 | {
18 | path:"/discover",
19 | component: () => import('@/views/Discover/Discover.vue'),
20 | meta: {
21 | keepAlive: true
22 | }
23 | },
24 | {
25 | path:"/recommend",
26 | component: () => import('@/views/Recommend/Recommend.vue'),
27 | meta: {
28 | keepAlive:true,
29 | }
30 | },
31 | {
32 | path:"/newsongs",
33 | component: () => import('@/views/NewSongs/NewSongs.vue'),
34 | },
35 | {
36 | path:"/mvs",
37 | component: () => import('@/views/MVs/MVs.vue'),
38 | meta: {
39 | keepAlive: true
40 | }
41 | },
42 | {
43 | path:'/result',
44 | component: () => import('@/views/Result/Result.vue'),
45 | },
46 | {
47 | path:'/playlist',
48 | component: () => import('@/views/Playlist/Playlist.vue'),
49 | },
50 | {
51 | path:'/mvdetail',
52 | component: () => import('@/views/MvDetail/MvDetail.vue')
53 | },
54 | {
55 | path:'/artist',
56 | component: () => import('@/views/Artist/Artist.vue')
57 | },
58 | {
59 | path:'/album',
60 | component: () => import('@/views/Album/Album.vue')
61 | }
62 | ]
63 |
64 | const router = new VueRouter({
65 | routes,
66 | // mode: 'history'
67 | })
68 |
69 | // router.beforeEach((to,from,next)=>{
70 | // let needKeepAlive = ['/recommend','/mvs']
71 | // if(needKeepAlive.includes(to.path) && (from.path==="/mvdetail" || from.path === '/playlist'))
72 | // to.meta.keepAlive = true
73 | // else
74 | // to.meta.keepAlive = false
75 | // next()
76 | // })
77 |
78 | export default router
--------------------------------------------------------------------------------
/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 | import mutations from './mutation'
4 |
5 | Vue.use(Vuex)
6 |
7 | const store = new Vuex.Store({
8 | state:{
9 | globalMusicUrl:"",
10 | globalMusicInfo:{},
11 | globalCurrentTime:0,
12 | isMusicPaused:true,
13 | musicQueue:[],
14 | nowIndex:0,
15 | deleteToNext:false,
16 | queuePos:{},
17 | queueStyle:'normal',
18 | },
19 | mutations
20 | })
21 |
22 | export default store
--------------------------------------------------------------------------------
/src/store/mutation.js:
--------------------------------------------------------------------------------
1 | const mutations = {
2 | changeMusicUrl(state,url){
3 | state.globalMusicUrl = url
4 | },
5 | changeMusicInfo(state,info){
6 | state.globalMusicInfo = info
7 | },
8 | changeCurrentTime(state,time){
9 | state.globalCurrentTime = time
10 | },
11 | changeMusicStatus(state,status){
12 | state.isMusicPaused = status
13 | },
14 | changeMusicQueue(state,obj){
15 | let ids = []
16 | for (const item of state.musicQueue) {
17 | ids.push(item.id)
18 | }
19 | if(!ids.includes(obj.id))
20 | state.musicQueue.push(obj)
21 | },
22 | deleteMusic(state,id){
23 | let queue = state.musicQueue
24 | for(let i=0;i {
20 | if(response.status == 200) {
21 | return Promise.resolve(response)
22 | }else{
23 | return Promise.reject(response)
24 | }
25 | },
26 | error => {
27 | error && Message({
28 | type:'error',
29 | message:'网络连接出问题了~',
30 | showClose:true
31 | })
32 | }
33 | )
34 |
35 | export default service
--------------------------------------------------------------------------------
/src/utils/utils.js:
--------------------------------------------------------------------------------
1 | export function formatDate(now) {
2 | var year=now.getFullYear(); //取得4位数的年份
3 | var month=(now.getMonth()+1).toString().padStart(2,'0'); //取得日期中的月份,其中0表示1月,11表示12月
4 | var date=now.getDate().toString().padStart(2,'0'); //返回日期月份中的天数(1到31)
5 | return year+"-"+month+"-"+date;
6 | }
7 |
8 | export function formatDateFully(now) {
9 | var year=now.getFullYear(); //取得4位数的年份
10 | var month=(now.getMonth()+1).toString().padStart(2,'0'); //取得日期中的月份,其中0表示1月,11表示12月
11 | var date=now.getDate().toString().padStart(2,'0'); //返回日期月份中的天数(1到31)
12 | var hour=now.getHours().toString().padStart(2,'0'); //返回日期中的小时数(0到23)
13 | var minute=now.getMinutes().toString().padStart(2,'0'); //返回日期中的分钟数(0到59)
14 | var second=now.getSeconds().toString().padStart(2,'0'); //返回日期中的秒数(0到59)
15 | return year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second;
16 | }
--------------------------------------------------------------------------------
/src/views/Album/Album.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
![]()
6 |
7 |
8 |
9 |
专辑
{{albumInfo.name}}
10 |
11 |
12 |
歌手:{{artistName}}
13 |
时间:{{albumInfo.publishTime}}
14 |
共{{albumInfo.size}}首
15 |
16 |
播放全部
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | {{singer.name}}/
36 |
37 |
38 |
39 |
40 |
41 | {{scope.row.al.name}}
42 | +
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
74 |
75 |
99 |
100 |
101 |
102 |
103 | 专辑介绍
104 | {{item}}
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
347 |
348 |
--------------------------------------------------------------------------------
/src/views/Artist/Artist.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
![]()
6 |
7 |
8 |
{{topInfo.name}}
9 |
10 |
单曲数:{{topInfo.musicSize}}
11 |
专辑数:{{topInfo.albumSize}}
12 |
MV数:{{mvData.length}}
13 |
14 |
15 |
16 |
17 |
18 |
19 |
29 |
30 |
31 |
32 | -
33 |
34 |
35 |
![]()
36 |
{{item.playCount | dealPlayCount}}
37 |
38 | {{item.name}}
39 |
40 | 暂无MV
41 |
42 |
43 |
44 |
45 | 个人简介
46 | {{y}}
47 |
48 |
49 |
{{item.ti}}
50 |
{{x}}
51 |
52 |
53 |
54 |
55 |
56 | -
57 |
58 |
![]()
59 |
60 | {{item.name}}
61 |
62 | 暂无相似歌手
63 |
64 |
65 |
66 |
67 |
68 |
69 |
189 |
190 |
--------------------------------------------------------------------------------
/src/views/Discover/Discover.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
推荐歌单
12 |
13 |
14 | -
15 |
{{item.copywriter}}
16 |
17 | {{item.name}}
18 |
19 |
20 |
21 |
22 |
23 |
最新音乐
24 |
25 | -
26 |
27 |
![newSongs]()
28 |
29 |
30 |
31 |
32 |
{{item.name}}
33 |
{{singer.name}}
34 |
35 |
36 |
37 |
38 |
54 |
55 |
56 |
57 |
162 |
163 |
--------------------------------------------------------------------------------
/src/views/MVs/MVs.vue:
--------------------------------------------------------------------------------
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 |
![newMvs]()
44 |
45 |
{{item.playCount}}
46 |
47 |
48 |
{{item.name}}
49 |
{{item.artistName}}
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
134 |
135 |
--------------------------------------------------------------------------------
/src/views/MvDetail/MvDetail.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
MV详情
5 |
6 |
7 |
8 |
9 |
10 |
11 |
![]()
12 |
{{mvInfo.artistName}}
13 |
14 |
{{mvInfo.name}}
15 |
16 |
发布:{{mvInfo.publishTime}}
17 |
播放:{{mvInfo.playCount}}次
18 |
19 |
{{mvInfo.desc}}
20 |
21 |
22 |
23 |
热门评论({{hotComments.length}})
24 |
43 |
44 |
45 |
46 |
最新评论({{this.total}})
47 |
66 |
67 |
68 |
69 |
70 |
71 |
相关推荐
72 |
73 | -
74 |
75 |
![newMvs]()
76 |
77 |
{{item.playCount}}
78 |
{{item.duration}}
79 |
80 |
81 |
{{item.name}}
82 |
{{item.artistName}}
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
206 |
207 |
--------------------------------------------------------------------------------
/src/views/NewSongs/NewSongs.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
![]()
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | {{x.name}}/
27 |
28 |
29 |
30 |
31 |
32 | {{scope.row.album}}
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
149 |
150 |
--------------------------------------------------------------------------------
/src/views/Playlist/Playlist.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
![]()
6 |
7 |
8 |
9 |
歌单
{{playlistInfo.name}}
10 |
11 |
12 |
13 |
![]()
14 |
15 |
{{playlistUserNickname}}
16 |
17 | {{playlistInfo.updateTime}} 创建
18 | 共{{trackIds.length}}首
19 |
20 |
21 |
播放全部
22 |
23 | 标签:
24 | {{item}}
25 |
26 |
27 | 简介:
28 | {{playlistInfo.description}}
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
![]()
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | {{singer.name}}/
64 |
65 |
66 |
67 |
68 |
69 | {{scope.row.al.name}}
70 | +
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
102 |
103 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
418 |
419 |
--------------------------------------------------------------------------------
/src/views/Recommend/Recommend.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
![bg-blur]()
5 |
6 |
7 |
![img]()
8 |
9 |
10 |
精品歌单
11 |
{{highQuality.name}}
12 |
{{highQuality.description}}
13 |
14 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
26 | -
27 |
播放量 : {{item.playCount}}
28 |
29 | {{item.name}}
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
113 |
114 |
--------------------------------------------------------------------------------
/src/views/Result/Result.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
{{keywords}}
5 | 共找到{{total}}个结果
6 |
7 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
20 |
21 | {{scope.row.songName}}
22 | {{scope.row.alia[0]}}
23 |
24 |
25 |
26 |
27 |
28 |
29 | {{x.name}}/
30 |
31 |
32 |
33 |
34 |
35 | {{scope.row.album}}
36 | +
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | -
51 |
播放量:{{item.playCount}}
52 |
53 | {{item.name}}
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | -
65 |
66 |
![newMvs]()
67 |
68 |
{{item.playCount}}
69 |
{{item.duration}}
70 |
71 |
72 |
{{item.name}}
73 |
{{item.artistName}}
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
341 |
342 |
--------------------------------------------------------------------------------
/vue.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | publicPath: './',
3 | productionSourceMap: false
4 | }
5 |
--------------------------------------------------------------------------------
最热评论({{hotComments.length}})
54 |55 |-
56 |
57 |
58 |
59 | {{item.user.nickname}}:
60 | {{item.content}}
61 |
62 |
63 | @{{item.beReplied[0].user.nickname}}:
64 | {{item.beReplied[0].content}}
65 |
66 |
67 |
70 |
71 |
72 |
73 |{{item.time}}
68 | {{item.likedCount}} 69 |