├── output.js ├── NeteaseCloudMusicApi ├── docs │ ├── .nojekyll │ ├── icon.png │ ├── favicon.ico │ ├── _coverpage.md │ ├── index.html │ └── sw.js ├── .npmignore ├── .travis.yml ├── .gitignore ├── static │ ├── mv.png │ ├── 专辑.png │ ├── 搜索.png │ ├── 歌词.png │ ├── 登录.png │ ├── docs.png │ ├── like.png │ ├── 推荐歌单.png │ ├── 推荐歌曲.png │ ├── 歌单详情.png │ ├── 用户歌单.png │ ├── artists.png │ ├── banner.png │ ├── comment.png │ ├── fm_trash.png │ ├── play_mv.png │ ├── top_list.png │ ├── 音乐 url.png │ ├── new_albums.png │ ├── songDetail.png │ ├── artist_album.png │ ├── likeSuccess.png │ ├── personal_fm.png │ ├── screenshot1.png │ ├── screenshot2.png │ ├── signinError.png │ ├── signinSuccess.png │ ├── top_artists.png │ └── top_playlist.png ├── util │ ├── index.js │ ├── crypto.js │ └── request.js ├── issue_template.md ├── module │ ├── banner.js │ ├── event.js │ ├── toplist.js │ ├── logout.js │ ├── personal_fm.js │ ├── user_subcount.js │ ├── weblog.js │ ├── album.js │ ├── artists.js │ ├── album_newest.js │ ├── dj_catelist.js │ ├── personalized_mv.js │ ├── playlist_hot.js │ ├── toplist_detail.js │ ├── dj_recommend.js │ ├── playlist_catlist.js │ ├── user_detail.js │ ├── login_refresh.js │ ├── personalized_djprogram.js │ ├── lyric.js │ ├── personalized_privatecontent.js │ ├── recommend_resource.js │ ├── dj_detail.js │ ├── mv_detail.js │ ├── likelist.js │ ├── simi_mv.js │ ├── artist_desc.js │ ├── search_hot.js │ ├── dj_program_detail.js │ ├── simi_artist.js │ ├── user_audio.js │ ├── video_detail.js │ ├── personalized_newsong.js │ ├── user_event.js │ ├── follow.js │ ├── mv_url.js │ ├── playlist_create.js │ ├── fm_trash.js │ ├── user_cloud.js │ ├── user_cloud_search.js │ ├── dj_sub.js │ ├── user_record.js │ ├── user_dj.js │ ├── video_url.js │ ├── playlist_detail.js │ ├── recommend_songs.js │ ├── search_multimatch.js │ ├── video_sub.js │ ├── dj_paygift.js │ ├── related_allvideo.js │ ├── top_mv.js │ ├── toplist_artist.js │ ├── mv_first.js │ ├── top_artists.js │ ├── album_sublist.js │ ├── artist_sublist.js │ ├── dj_sublist.js │ ├── playlist_subscribe.js │ ├── user_playlist.js │ ├── search_suggest.js │ ├── simi_song.js │ ├── simi_user.js │ ├── artist_album.js │ ├── simi_playlist.js │ ├── artist_mv.js │ ├── mv_sublist.js │ ├── program_recommend.js │ ├── user_followeds.js │ ├── mv_sub.js │ ├── user_follows.js │ ├── personalized.js │ ├── artist_sub.js │ ├── playlist_tracks.js │ ├── top_album.js │ ├── comment_dj.js │ ├── comment_mv.js │ ├── comment_album.js │ ├── comment_music.js │ ├── comment_playlist.js │ ├── comment_video.js │ ├── send_text.js │ ├── video_group.js │ ├── send_playlist.js │ ├── top_song.js │ ├── song_detail.js │ ├── login.js │ ├── search.js │ ├── dj_hot.js │ ├── dj_program.js │ ├── song_url.js │ ├── top_playlist_highquality.js │ ├── login_cellphone.js │ ├── resource_like.js │ ├── user_update.js │ ├── like.js │ ├── daily_signin.js │ ├── playlist_update.js │ ├── scrobble.js │ ├── comment_hot.js │ ├── dj_recommend_type.js │ ├── comment_like.js │ ├── top_playlist.js │ ├── login_status.js │ ├── comment.js │ ├── artist_list.js │ ├── check_music.js │ ├── top_list.js │ └── related_playlist.js ├── Dockerfile ├── app.test.js ├── test │ ├── album.test.js │ ├── comment.test.js │ ├── lyric.test.js │ ├── music_url.test.js │ ├── search.test.js │ └── login.test.js ├── package.json ├── public │ ├── test.html │ └── index.html ├── LICENSE ├── app.js ├── README.MD └── CHANGELOG.MD ├── server ├── server.conf ├── config.js ├── package.json └── index.js ├── src ├── api │ ├── config.js │ ├── recommend.js │ ├── recNewMusic.js │ ├── recSongList.js │ ├── singer.js │ ├── songs.js │ ├── rank.js │ ├── music.js │ ├── songList.js │ └── search.js ├── assets │ ├── back.png │ ├── clear.png │ ├── down.png │ ├── lazy3.png │ ├── list.png │ ├── list2.png │ ├── logo.png │ ├── loop.png │ ├── next.png │ ├── pause.png │ ├── play.png │ ├── play2.png │ ├── creator.png │ ├── delete.png │ ├── loading.png │ ├── pause2.png │ ├── playall.png │ ├── random.png │ ├── search.png │ ├── BgImage1.png │ ├── BgImage2.png │ ├── BgImage3.png │ ├── downWhite.png │ ├── playcount.png │ ├── previous.png │ ├── sequence.png │ └── listPlayIcon.png ├── common │ ├── styles │ │ └── variable.styl │ └── js │ │ ├── axios.js │ │ ├── dom.js │ │ ├── cache.js │ │ ├── creatListData.js │ │ └── singerTypeData.js ├── store │ ├── actions.js │ ├── state.js │ ├── mutations.js │ ├── getters.js │ └── index.js ├── main.js ├── base │ ├── gridLists.vue │ ├── popup.vue │ ├── loading.vue │ ├── myScroll.vue │ ├── playList.vue │ ├── songList.vue │ ├── MusicList.vue │ ├── progressBar.vue │ ├── category.vue │ └── slider.vue ├── components │ ├── tab │ │ └── tab.vue │ ├── singer │ │ └── singer.vue │ ├── songs │ │ └── songs.vue │ ├── recommend │ │ └── recommend.vue │ ├── rank │ │ └── rank.vue │ └── songListPage │ │ └── songListPage.vue ├── App.vue └── router.js ├── .browserslistrc ├── babel.config.js ├── postcss.config.js ├── public ├── favicon.ico └── index.html ├── .editorconfig ├── README.md ├── .gitignore ├── .eslintrc.js ├── vue.config.js └── package.json /output.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/docs/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/server.conf: -------------------------------------------------------------------------------- 1 | port=80 2 | page_path=../dist -------------------------------------------------------------------------------- /src/api/config.js: -------------------------------------------------------------------------------- 1 | export const STATUS_TEXT = 'OK' -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not ie <= 8 4 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/.npmignore: -------------------------------------------------------------------------------- 1 | static 2 | docs 3 | node_modules -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - 6.2 5 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | autoprefixer: {} 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /src/assets/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/back.png -------------------------------------------------------------------------------- /src/assets/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/clear.png -------------------------------------------------------------------------------- /src/assets/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/down.png -------------------------------------------------------------------------------- /src/assets/lazy3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/lazy3.png -------------------------------------------------------------------------------- /src/assets/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/list.png -------------------------------------------------------------------------------- /src/assets/list2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/list2.png -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/logo.png -------------------------------------------------------------------------------- /src/assets/loop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/loop.png -------------------------------------------------------------------------------- /src/assets/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/next.png -------------------------------------------------------------------------------- /src/assets/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/pause.png -------------------------------------------------------------------------------- /src/assets/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/play.png -------------------------------------------------------------------------------- /src/assets/play2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/play2.png -------------------------------------------------------------------------------- /src/assets/creator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/creator.png -------------------------------------------------------------------------------- /src/assets/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/delete.png -------------------------------------------------------------------------------- /src/assets/loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/loading.png -------------------------------------------------------------------------------- /src/assets/pause2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/pause2.png -------------------------------------------------------------------------------- /src/assets/playall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/playall.png -------------------------------------------------------------------------------- /src/assets/random.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/random.png -------------------------------------------------------------------------------- /src/assets/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/search.png -------------------------------------------------------------------------------- /src/assets/BgImage1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/BgImage1.png -------------------------------------------------------------------------------- /src/assets/BgImage2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/BgImage2.png -------------------------------------------------------------------------------- /src/assets/BgImage3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/BgImage3.png -------------------------------------------------------------------------------- /src/assets/downWhite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/downWhite.png -------------------------------------------------------------------------------- /src/assets/playcount.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/playcount.png -------------------------------------------------------------------------------- /src/assets/previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/previous.png -------------------------------------------------------------------------------- /src/assets/sequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/sequence.png -------------------------------------------------------------------------------- /src/assets/listPlayIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/src/assets/listPlayIcon.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | *.log 4 | 5 | .idea/ 6 | package-lock.json 7 | 8 | .vscode -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/docs/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/docs/icon.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/mv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/mv.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/专辑.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/专辑.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/搜索.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/搜索.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/歌词.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/歌词.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/登录.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/登录.png -------------------------------------------------------------------------------- /src/common/styles/variable.styl: -------------------------------------------------------------------------------- 1 | $themeColor = #EC3A3E 2 | $BgGray = #FAFAFA 3 | $fontGray = #666 4 | $miniPlayerHeight = 45px -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/docs/favicon.ico -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/docs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/docs.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/like.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/推荐歌单.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/推荐歌单.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/推荐歌曲.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/推荐歌曲.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/歌单详情.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/歌单详情.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/用户歌单.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/用户歌单.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/artists.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/artists.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/banner.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/comment.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/fm_trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/fm_trash.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/play_mv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/play_mv.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/top_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/top_list.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/音乐 url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/音乐 url.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/new_albums.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/new_albums.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/songDetail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/songDetail.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/artist_album.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/artist_album.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/likeSuccess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/likeSuccess.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/personal_fm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/personal_fm.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/screenshot1.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/screenshot2.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/signinError.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/signinError.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/signinSuccess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/signinSuccess.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/top_artists.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/top_artists.png -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/static/top_playlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TianXiaoShang/iDoMusic/HEAD/NeteaseCloudMusicApi/static/top_playlist.png -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{js,jsx,ts,tsx,vue}] 2 | indent_style = space 3 | indent_size = 2 4 | trim_trailing_whitespace = true 5 | insert_final_newline = true 6 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/util/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | toBoolean(val) { 3 | if (val === '') return val 4 | return val === 'true' || val == '1' 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/api/recommend.js: -------------------------------------------------------------------------------- 1 | import myAxios from "common/js/axios" 2 | 3 | export default function getBannerData(){ 4 | var url = '/api/banner'; 5 | return myAxios(url) 6 | } -------------------------------------------------------------------------------- /src/api/recNewMusic.js: -------------------------------------------------------------------------------- 1 | import myAxios from "common/js/axios"; 2 | 3 | export default function getRecNewMusicData(){ 4 | let url = 'api/personalized/newsong' 5 | return myAxios(url) 6 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/issue_template.md: -------------------------------------------------------------------------------- 1 | ### 环境 2 | 系统: 3 | 4 | nodejs 版本: 5 | 6 | ### 出现问题 7 | 8 | ### 重现步骤 9 | 10 | ### 期待效果 11 | 12 | >重现步骤尽量详细,不能含糊不清 13 | 14 | >如果不是提建议,提 issues 如果不照着模版来将不会优先处理或直接关闭 -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/banner.js: -------------------------------------------------------------------------------- 1 | // 首页轮播图 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/api/v2/banner/get`, {clientType: "pc"}, 6 | {crypto: 'linuxapi', proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/event.js: -------------------------------------------------------------------------------- 1 | // 动态 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/v1/event/get`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/toplist.js: -------------------------------------------------------------------------------- 1 | // 所有榜单介绍 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/toplist`, {}, 6 | {crypto: 'linuxapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/logout.js: -------------------------------------------------------------------------------- 1 | // 退出登录 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/logout`, {}, 6 | {crypto: 'weapi', ua: 'pc', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/personal_fm.js: -------------------------------------------------------------------------------- 1 | // 私人FM 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/v1/radio/get`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/user_subcount.js: -------------------------------------------------------------------------------- 1 | // 收藏计数 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/subcount`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/weblog.js: -------------------------------------------------------------------------------- 1 | // 操作记录 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/feedback/weblog`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/docs/_coverpage.md: -------------------------------------------------------------------------------- 1 | # 网易云音乐 API 2 | 3 | > 网易云音乐 NodeJS 版 API 4 | 5 | - 全部接口已升级到最新 6 | - 具备登录接口 7 | - 更完善的文档 8 | 9 | 10 | [GitHub](https://github.com/Binaryify/NeteaseCloudMusicApi) 11 | [Get Started](#neteasecloudmusicapi) 12 | 13 | ![color](#ffffff) -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/album.js: -------------------------------------------------------------------------------- 1 | // 专辑内容 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/v1/album/${query.id}`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/artists.js: -------------------------------------------------------------------------------- 1 | // 歌手单曲 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/v1/artist/${query.id}`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /src/store/actions.js: -------------------------------------------------------------------------------- 1 | export const selectPlay = function ({commit, state},{list,index,id}){ 2 | commit('set_playList',list) 3 | commit('set_currentIndex',index) 4 | commit('set_showPlayer',true) 5 | commit('set_playStatus',true) 6 | commit('set_musicId', id) 7 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/album_newest.js: -------------------------------------------------------------------------------- 1 | // 最新专辑 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/api/discovery/newAlbum`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } 9 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/dj_catelist.js: -------------------------------------------------------------------------------- 1 | // 电台分类列表 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/djradio/category/get`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/personalized_mv.js: -------------------------------------------------------------------------------- 1 | // 推荐MV 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/personalized/mv`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/playlist_hot.js: -------------------------------------------------------------------------------- 1 | // 热门歌单分类 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/playlist/hottags`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/toplist_detail.js: -------------------------------------------------------------------------------- 1 | // 所有榜单内容摘要 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/toplist/detail`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/dj_recommend.js: -------------------------------------------------------------------------------- 1 | // 精选电台 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/djradio/recommend/v1`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } 9 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/playlist_catlist.js: -------------------------------------------------------------------------------- 1 | // 全部歌单分类 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/playlist/catalogue`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/user_detail.js: -------------------------------------------------------------------------------- 1 | // 用户详情 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/v1/user/detail/${query.uid}`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/login_refresh.js: -------------------------------------------------------------------------------- 1 | // 登录刷新 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/login/token/refresh`, {}, 6 | {crypto: 'weapi', ua: 'pc', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/personalized_djprogram.js: -------------------------------------------------------------------------------- 1 | // 推荐电台 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/personalized/djprogram`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # idomusic 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### open Netease Cloud api 14 | ``` 15 | cd NeteaseCloudMusicApi 16 | node app.js 17 | ``` 18 | 19 | 20 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/lyric.js: -------------------------------------------------------------------------------- 1 | // 歌词 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/song/lyric?os=osx&id=${query.id}&lv=-1&kv=-1&tv=-1`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/personalized_privatecontent.js: -------------------------------------------------------------------------------- 1 | // 独家放送 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/personalized/privatecontent`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/recommend_resource.js: -------------------------------------------------------------------------------- 1 | // 每日推荐歌单 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'POST', `https://music.163.com/weapi/v1/discovery/recommend/resource`, {}, 6 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw* 22 | -------------------------------------------------------------------------------- /src/api/recSongList.js: -------------------------------------------------------------------------------- 1 | import myAxios from "common/js/axios" 2 | 3 | export default function getRecSongListData(limit,before){ 4 | var url = 'api/personalized' //获取推荐歌单地址 5 | // var url = 'api/top/playlist/highquality' 6 | var params = { 7 | limit:6 8 | } 9 | return myAxios(url,params) 10 | } -------------------------------------------------------------------------------- /src/api/singer.js: -------------------------------------------------------------------------------- 1 | import myAxios from "common/js/axios" 2 | 3 | export default function getSingerData (cat){ 4 | var url = "api/artist/list" 5 | url = cat == undefined ? "api/top/artists" : url //默认获取热门歌手 6 | var params = { 7 | limit:100, 8 | cat 9 | } 10 | return myAxios(url,params) 11 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/dj_detail.js: -------------------------------------------------------------------------------- 1 | // 电台详情 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | id: query.rid 6 | } 7 | return request( 8 | 'POST', `https://music.163.com/weapi/djradio/get`, data, 9 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 10 | ) 11 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/mv_detail.js: -------------------------------------------------------------------------------- 1 | // MV详情 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | id: query.mvid 6 | } 7 | return request( 8 | 'POST', `https://music.163.com/weapi/mv/detail`, data, 9 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 10 | ) 11 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mhart/alpine-node:9 2 | 3 | WORKDIR /app 4 | COPY . /app 5 | 6 | RUN rm -f package-lock.json \ 7 | ; rm -rf .idea \ 8 | ; rm -rf node_modules \ 9 | ; npm config set registry "https://registry.npm.taobao.org/" \ 10 | && npm install 11 | 12 | EXPOSE 3000 13 | CMD ["node", "app.js"] 14 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/likelist.js: -------------------------------------------------------------------------------- 1 | // 喜欢的歌曲(无序) 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | uid: query.uid 6 | } 7 | return request( 8 | 'POST', `https://music.163.com/weapi/song/like/get`, data, 9 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 10 | ) 11 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/simi_mv.js: -------------------------------------------------------------------------------- 1 | // 相似MV 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | mvid: query.mvid 6 | } 7 | return request( 8 | 'POST', `https://music.163.com/weapi/discovery/simiMV`, data, 9 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 10 | ) 11 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/artist_desc.js: -------------------------------------------------------------------------------- 1 | // 歌手介绍 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | id: query.id 6 | } 7 | return request( 8 | 'POST', `https://music.163.com/weapi/artist/introduction`, data, 9 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 10 | ) 11 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/search_hot.js: -------------------------------------------------------------------------------- 1 | // 热门搜索 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | type: 1111 6 | } 7 | return request( 8 | 'POST', `https://music.163.com/weapi/search/hot`, data, 9 | {crypto: 'weapi', ua: 'mobile', cookie: query.cookie, proxy: query.proxy} 10 | ) 11 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/dj_program_detail.js: -------------------------------------------------------------------------------- 1 | // 电台节目详情 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | id: query.id 6 | } 7 | return request( 8 | 'POST', `https://music.163.com/weapi/dj/program/detail`, data, 9 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 10 | ) 11 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/simi_artist.js: -------------------------------------------------------------------------------- 1 | // 相似歌手 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | artistid: query.id 6 | } 7 | return request( 8 | 'POST', `https://music.163.com/weapi/discovery/simiArtist`, data, 9 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 10 | ) 11 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/user_audio.js: -------------------------------------------------------------------------------- 1 | // 用户创建的电台 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | userId: query.uid 6 | } 7 | return request( 8 | 'POST', `https://music.163.com/weapi/djradio/get/byuser`, data, 9 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 10 | ) 11 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/video_detail.js: -------------------------------------------------------------------------------- 1 | // 视频详情 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | id: query.id 6 | } 7 | return request( 8 | 'POST', `https://music.163.com/weapi/cloudvideo/v1/video/detail`, data, 9 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 10 | ) 11 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/personalized_newsong.js: -------------------------------------------------------------------------------- 1 | // 推荐新歌 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | type: "recommend" 6 | } 7 | return request( 8 | 'POST', `https://music.163.com/weapi/personalized/newsong`, data, 9 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 10 | ) 11 | } -------------------------------------------------------------------------------- /server/config.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | 3 | var conf = fs.readFileSync('./server.conf') 4 | 5 | var configArr = conf.toString().split('\n') 6 | 7 | var globalConfig = {} 8 | 9 | for(var i = 0; i < configArr.length; i ++) { 10 | globalConfig[configArr[i].split('=')[0]] = configArr[i].split('=')[1].trim() 11 | } 12 | 13 | module.exports = globalConfig -------------------------------------------------------------------------------- /src/store/state.js: -------------------------------------------------------------------------------- 1 | const state = { 2 | showPlayer:false, //窗口状态 3 | playList:[], //当前列表的原始所有歌曲数据 4 | currentIndex:-1, //当前播放的歌曲在列表中的index 5 | playStatus:false, //播放暂停与否 6 | mode:'sequence', //播放模式 7 | sequenceList:[], //播放列表,主要用于储存随机播放列表 8 | musicId:'' //当前播放的歌曲id 9 | } 10 | export default state -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/user_event.js: -------------------------------------------------------------------------------- 1 | // 用户动态 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | time: -1, 6 | getcounts: true 7 | } 8 | return request( 9 | 'POST', `https://music.163.com/weapi/event/get/${query.uid}`, data, 10 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 11 | ) 12 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/follow.js: -------------------------------------------------------------------------------- 1 | // 关注与取消关注用户 2 | 3 | module.exports = (query, request) => { 4 | query.cookie.os = 'pc' 5 | query.t = (query.t == 1 ? 'follow' : 'delfollow') 6 | return request( 7 | 'POST', `https://music.163.com/weapi/user/${query.t}/${query.id}`, {}, 8 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 9 | ) 10 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/mv_url.js: -------------------------------------------------------------------------------- 1 | // MV链接 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | id: query.id, 6 | r: query.res || 1080 7 | } 8 | return request( 9 | 'POST', `https://music.163.com/weapi/song/enhance/play/mv/url`, data, 10 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 11 | ) 12 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/playlist_create.js: -------------------------------------------------------------------------------- 1 | // 创建歌单 2 | 3 | module.exports = (query, request) => { 4 | query.cookie.os = 'pc' 5 | const data = { 6 | name: query.name 7 | } 8 | return request( 9 | 'POST', `https://music.163.com/weapi/playlist/create`, data, 10 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 11 | ) 12 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/fm_trash.js: -------------------------------------------------------------------------------- 1 | // 垃圾桶 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | songId: query.id 6 | } 7 | return request( 8 | 'POST', `https://music.163.com/weapi/radio/trash/add?alg=RT&songId=${query.id}&time=${query.time || 25}`, data, 9 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 10 | ) 11 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/user_cloud.js: -------------------------------------------------------------------------------- 1 | // 云盘数据 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | limit: query.limit || 200, 6 | offset: query.offset || 0 7 | } 8 | return request( 9 | 'POST', `https://music.163.com/weapi/v1/cloud/get`, data, 10 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 11 | ) 12 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/user_cloud_search.js: -------------------------------------------------------------------------------- 1 | // 云盘数据详情(暂时不要使用) 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | byids: query.id, 6 | id: query.id 7 | } 8 | return request( 9 | 'POST', `https://music.163.com/weapi/v1/cloud/get/byids`, data, 10 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 11 | ) 12 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/dj_sub.js: -------------------------------------------------------------------------------- 1 | // 订阅与取消电台 2 | 3 | module.exports = (query, request) => { 4 | query.t = (query.t == 1 ? 'sub' : 'unsub') 5 | const data = { 6 | id: query.rid 7 | } 8 | return request( 9 | 'POST', `https://music.163.com/weapi/djradio/${query.t}`, data, 10 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 11 | ) 12 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/user_record.js: -------------------------------------------------------------------------------- 1 | // 听歌排行 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | uid: query.uid, 6 | type: query.type || 1 // 1: 最近一周, 0: 所有时间 7 | } 8 | return request( 9 | 'POST', `https://music.163.com/weapi/v1/play/record`, data, 10 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 11 | ) 12 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/user_dj.js: -------------------------------------------------------------------------------- 1 | // 用户电台节目 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | limit: query.limit || 30, 6 | offset: query.offset || 0 7 | } 8 | return request( 9 | 'POST', `https://music.163.com/weapi/dj/program/${query.uid}`, data, 10 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 11 | ) 12 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/video_url.js: -------------------------------------------------------------------------------- 1 | // 视频链接 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | ids: '["' + query.id + '"]', 6 | resolution: query.res || 1080 7 | } 8 | return request( 9 | 'POST', `https://music.163.com/weapi/cloudvideo/playurl`, data, 10 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 11 | ) 12 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/playlist_detail.js: -------------------------------------------------------------------------------- 1 | // 歌单详情 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | id: query.id, 6 | n: 100000, 7 | s: query.s || 8 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/v3/playlist/detail`, data, 11 | {crypto: 'linuxapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/recommend_songs.js: -------------------------------------------------------------------------------- 1 | // 每日推荐歌曲 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | limit: 20, 6 | offset: 0, 7 | total: true 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/v1/discovery/recommend/songs`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/search_multimatch.js: -------------------------------------------------------------------------------- 1 | // 多类型搜索 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | type: query.type || 1, 6 | s: query.keywords || '' 7 | } 8 | return request( 9 | 'POST', `https://music.163.com/weapi/search/suggest/multimatch`, data, 10 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 11 | ) 12 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/video_sub.js: -------------------------------------------------------------------------------- 1 | // 收藏与取消收藏视频 2 | 3 | module.exports = (query, request) => { 4 | query.t = (query.t == 1 ? 'sub' : 'unsub') 5 | const data = { 6 | id: query.id 7 | } 8 | return request( 9 | 'POST', `https://music.163.com/weapi/cloudvideo/video/${query.t}`, data, 10 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 11 | ) 12 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/dj_paygift.js: -------------------------------------------------------------------------------- 1 | // 付费电台 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | limit: query.limit || 10, 6 | offset: query.offset || 0 7 | } 8 | return request( 9 | 'POST', `https://music.163.com/weapi/djradio/home/paygift/list?_nmclfl=1`, data, 10 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 11 | ) 12 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/related_allvideo.js: -------------------------------------------------------------------------------- 1 | // 相关视频 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | id: query.id, 6 | type: (/^\d+$/.test(query.id)) ? 0 : 1 7 | } 8 | return request( 9 | 'POST', `https://music.163.com/weapi/cloudvideo/v1/allvideo/rcmd`, data, 10 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 11 | ) 12 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/top_mv.js: -------------------------------------------------------------------------------- 1 | // MV排行榜 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | limit: query.limit || 30, 6 | offset: query.offset || 0, 7 | total: true 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/mv/toplist`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/toplist_artist.js: -------------------------------------------------------------------------------- 1 | // 歌手榜 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | type: 1, 6 | limit: 100, 7 | offset: 0, 8 | total: true 9 | } 10 | return request( 11 | 'POST', `https://music.163.com/weapi/toplist/artist`, data, 12 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 13 | ) 14 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/mv_first.js: -------------------------------------------------------------------------------- 1 | // 最新MV 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | // 'offset': query.offset || 0, 6 | limit: query.limit || 30, 7 | total: true 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/mv/first`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/top_artists.js: -------------------------------------------------------------------------------- 1 | // 热门歌手 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | limit: query.limit || 50, 6 | offset: query.offset || 0, 7 | total: true 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/artist/top`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "express": "^4.16.4" 13 | }, 14 | "devDependencies": { 15 | "http-proxy-middleware": "^0.19.1" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/album_sublist.js: -------------------------------------------------------------------------------- 1 | // 已收藏专辑列表 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | limit: query.limit || 25, 6 | offset: query.offset || 0, 7 | total: true 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/album/sublist`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/artist_sublist.js: -------------------------------------------------------------------------------- 1 | // 关注歌手列表 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | limit: query.limit || 25, 6 | offset: query.offset || 0, 7 | total: true 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/artist/sublist`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/dj_sublist.js: -------------------------------------------------------------------------------- 1 | // 订阅电台列表 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | limit: query.limit || 30, 6 | offset: query.offset || 0, 7 | total: true 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/djradio/get/subed`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/playlist_subscribe.js: -------------------------------------------------------------------------------- 1 | // 收藏与取消收藏歌单 2 | 3 | module.exports = (query, request) => { 4 | query.t = (query.t == 1 ? 'subscribe' : 'unsubscribe') 5 | const data = { 6 | id: query.id 7 | } 8 | return request( 9 | 'POST', `https://music.163.com/weapi/playlist/${query.t}`, data, 10 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 11 | ) 12 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/user_playlist.js: -------------------------------------------------------------------------------- 1 | // 用户歌单 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | uid: query.uid, 6 | limit: query.limit || 30, 7 | offset: query.offset || 0 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/user/playlist`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/search_suggest.js: -------------------------------------------------------------------------------- 1 | // 搜索建议 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | s: query.keywords || '' 6 | } 7 | let type = query.type == 'mobile' ? 'keyword' : 'web' 8 | return request( 9 | 'POST', `https://music.163.com/weapi/search/suggest/` + type, data, 10 | { crypto: 'weapi', cookie: query.cookie, proxy: query.proxy } 11 | ) 12 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/simi_song.js: -------------------------------------------------------------------------------- 1 | // 相似歌曲 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | songid: query.id, 6 | limit: query.limit || 50, 7 | offset: query.offset || 0 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/v1/discovery/simiSong`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/simi_user.js: -------------------------------------------------------------------------------- 1 | // 相似用户 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | songid: query.id, 6 | limit: query.limit || 50, 7 | offset: query.offset || 0 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/discovery/simiUser`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/artist_album.js: -------------------------------------------------------------------------------- 1 | // 歌手专辑列表 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | limit: query.limit || 30, 6 | offset: query.offset || 0, 7 | total: true 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/artist/albums/${query.id}`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/simi_playlist.js: -------------------------------------------------------------------------------- 1 | // 相似歌单 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | songid: query.id, 6 | limit: query.limit || 50, 7 | offset: query.offset || 0 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/discovery/simiPlaylist`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | 'extends': [ 7 | 'plugin:vue/essential', 8 | '@vue/standard' 9 | ], 10 | rules: { 11 | 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 12 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 13 | }, 14 | parserOptions: { 15 | parser: 'babel-eslint' 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/artist_mv.js: -------------------------------------------------------------------------------- 1 | // 歌手相关MV 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | artistId: query.id, 6 | limit: query.limit, 7 | offset: query.offset, 8 | total: true 9 | } 10 | return request( 11 | 'POST', `https://music.163.com/weapi/artist/mvs`, data, 12 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 13 | ) 14 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/mv_sublist.js: -------------------------------------------------------------------------------- 1 | // // 已收藏MV列表 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | limit: query.limit || 25, 6 | offset: query.offset || 0, 7 | total: true 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/cloudvideo/allvideo/sublist`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/program_recommend.js: -------------------------------------------------------------------------------- 1 | // 推荐节目 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | cateId: query.type, 6 | limit: query.limit || 10, 7 | offset: query.offset || 0 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/program/recommend/v1`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/user_followeds.js: -------------------------------------------------------------------------------- 1 | // 关注TA的人(粉丝) 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | userId: query.uid, 6 | limit: query.limit || 30, 7 | offset: query.offset || 0 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/user/getfolloweds`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/mv_sub.js: -------------------------------------------------------------------------------- 1 | // 收藏与取消收藏MV 2 | 3 | module.exports = (query, request) => { 4 | query.t = (query.t == 1 ? 'sub' : 'unsub') 5 | const data = { 6 | mvId: query.mvid, 7 | mvIds: '["' + query.mvid + '"]' 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/mv/${query.t}`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/user_follows.js: -------------------------------------------------------------------------------- 1 | // TA关注的人(关注) 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | offset: query.offset || 0, 6 | limit: query.limit || 30, 7 | order: true 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/user/getfollows/${query.uid}`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/personalized.js: -------------------------------------------------------------------------------- 1 | // 推荐歌单 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | limit: query.limit || 30, 6 | offset: query.limit || 0, 7 | total: true, 8 | n: 1000 9 | } 10 | return request( 11 | 'POST', `https://music.163.com/weapi/personalized/playlist`, data, 12 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 13 | ) 14 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/artist_sub.js: -------------------------------------------------------------------------------- 1 | // 收藏与取消收藏歌手 2 | 3 | module.exports = (query, request) => { 4 | query.t = (query.t == 1 ? 'sub' : 'unsub') 5 | const data = { 6 | artistId: query.id, 7 | artistIds: '[' + query.id + ']' 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/artist/${query.t}`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/playlist_tracks.js: -------------------------------------------------------------------------------- 1 | // 收藏单曲到歌单 从歌单删除歌曲 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | op: query.op, // del,add 6 | pid: query.pid, // 歌单id 7 | trackIds: '[' + query.tracks + ']' // 歌曲id 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/playlist/manipulate/tracks`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/top_album.js: -------------------------------------------------------------------------------- 1 | // 新碟上架 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | area: query.type || 'ALL', // ALL,ZH,EA,KR,JP 6 | limit: query.limit || 50, 7 | offset: query.offset || 0, 8 | total: true 9 | } 10 | return request( 11 | 'POST', `https://music.163.com/weapi/album/new`, data, 12 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 13 | ) 14 | } -------------------------------------------------------------------------------- /src/common/js/axios.js: -------------------------------------------------------------------------------- 1 | import Axios from "axios" 2 | 3 | export default function myAxios(url,params){ 4 | url = handle(params) ? url+= (url.indexOf('?') == -1 ? '?' : '&') + handle(params) : url 5 | return Axios.get(url) 6 | } 7 | 8 | function handle(params){ 9 | var arr = []; 10 | for(var key in params){ 11 | arr.push(params[key] == undefined ? '' :key + '=' + encodeURIComponent(params[key])) 12 | } 13 | return arr.join('&') 14 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/comment_dj.js: -------------------------------------------------------------------------------- 1 | // 电台评论 2 | 3 | module.exports = (query, request) => { 4 | query.cookie.os = 'pc' 5 | const data = { 6 | rid: query.id, 7 | limit: query.limit || 20, 8 | offset: query.offset || 0 9 | } 10 | return request( 11 | 'POST', `https://music.163.com/weapi/v1/resource/comments/A_DJ_1_${query.id}`, data, 12 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 13 | ) 14 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/comment_mv.js: -------------------------------------------------------------------------------- 1 | // MV评论 2 | 3 | module.exports = (query, request) => { 4 | query.cookie.os = 'pc' 5 | const data = { 6 | rid: query.id, 7 | limit: query.limit || 20, 8 | offset: query.offset || 0 9 | } 10 | return request( 11 | 'POST', `https://music.163.com/weapi/v1/resource/comments/R_MV_5_${query.id}`, data, 12 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 13 | ) 14 | } -------------------------------------------------------------------------------- /server/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express') 2 | var proxy = require('http-proxy-middleware') 3 | var globalConfig = require('./config') 4 | 5 | var app = new express() 6 | 7 | app.use('/', express.static(globalConfig.page_path,{maxAge:'1m'})) 8 | app.use('/api', proxy({ 9 | target: 'http://localhost:3000', 10 | pathRewrite: {'/api': ''} 11 | })) 12 | 13 | app.listen(globalConfig.port, function () { 14 | console.log('服务器,启动!' + globalConfig.port) 15 | }) 16 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/comment_album.js: -------------------------------------------------------------------------------- 1 | // 专辑评论 2 | 3 | module.exports = (query, request) => { 4 | query.cookie.os = 'pc' 5 | const data = { 6 | rid: query.id, 7 | limit: query.limit || 20, 8 | offset: query.offset || 0 9 | } 10 | return request( 11 | 'POST', `https://music.163.com/weapi/v1/resource/comments/R_AL_3_${query.id}`, data, 12 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 13 | ) 14 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/comment_music.js: -------------------------------------------------------------------------------- 1 | // 歌曲评论 2 | 3 | module.exports = (query, request) => { 4 | query.cookie.os = 'pc' 5 | const data = { 6 | rid: query.id, 7 | limit: query.limit || 20, 8 | offset: query.offset || 0 9 | } 10 | return request( 11 | 'POST', `https://music.163.com/weapi/v1/resource/comments/R_SO_4_${query.id}`, data, 12 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 13 | ) 14 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/comment_playlist.js: -------------------------------------------------------------------------------- 1 | // 歌单评论 2 | 3 | module.exports = (query, request) => { 4 | query.cookie.os = 'pc' 5 | const data = { 6 | rid: query.id, 7 | limit: query.limit || 20, 8 | offset: query.offset || 0 9 | } 10 | return request( 11 | 'POST', `https://music.163.com/weapi/v1/resource/comments/A_PL_0_${query.id}`, data, 12 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 13 | ) 14 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/comment_video.js: -------------------------------------------------------------------------------- 1 | // 视频评论 2 | 3 | module.exports = (query, request) => { 4 | query.cookie.os = 'pc' 5 | const data = { 6 | rid: query.id, 7 | limit: query.limit || 20, 8 | offset: query.offset || 0 9 | } 10 | return request( 11 | 'POST', `https://music.163.com/weapi/v1/resource/comments/R_VI_62_${query.id}`, data, 12 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 13 | ) 14 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/send_text.js: -------------------------------------------------------------------------------- 1 | // 私信 2 | 3 | module.exports = (query, request) => { 4 | query.cookie.os = 'pc' 5 | const data = { 6 | id: query.playlist, 7 | type: 'text', 8 | msg: query.msg, 9 | userIds: '[' + query.user_ids + ']' 10 | } 11 | return request( 12 | 'POST', `https://music.163.com/weapi/msg/private/send`, data, 13 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 14 | ) 15 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/video_group.js: -------------------------------------------------------------------------------- 1 | // 视频链接 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | groupId: query.id, 6 | offset: query.offset || 0, 7 | needUrl: true, 8 | resolution: query.res || 1080 9 | } 10 | return request( 11 | 'POST', `https://music.163.com/weapi/videotimeline/videogroup/get`, data, { 12 | crypto: 'weapi', 13 | cookie: query.cookie, 14 | proxy: query.proxy 15 | } 16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/send_playlist.js: -------------------------------------------------------------------------------- 1 | // 私信歌单 2 | 3 | module.exports = (query, request) => { 4 | query.cookie.os = 'pc' 5 | const data = { 6 | id: query.playlist, 7 | type: 'playlist', 8 | msg: query.msg, 9 | userIds: '[' + query.user_ids + ']' 10 | } 11 | return request( 12 | 'POST', `https://music.163.com/weapi/msg/private/send`, data, 13 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 14 | ) 15 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/top_song.js: -------------------------------------------------------------------------------- 1 | // 新歌速递 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | areaId: query.type || 0, // 全部:0 华语:7 欧美:96 日本:8 韩国:16 6 | // limit: query.limit || 100, 7 | // offset: query.offset || 0, 8 | total: true 9 | } 10 | return request( 11 | 'POST', 12 | `https://music.163.com/weapi/v1/discovery/new/songs`, 13 | data, 14 | { crypto: 'weapi', cookie: query.cookie, proxy: query.proxy } 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/song_detail.js: -------------------------------------------------------------------------------- 1 | // 歌曲详情 2 | 3 | module.exports = (query, request) => { 4 | query.ids = query.ids.split(/\s*,\s*/) 5 | const data = { 6 | c: '[' + query.ids.map(id => ('{"id":' + id + '}')).join(',') + ']', 7 | ids: '[' + query.ids.join(',') + ']' 8 | } 9 | return request( 10 | 'POST', `https://music.163.com/weapi/v3/song/detail`, data, 11 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 12 | ) 13 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/app.test.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const path = require('path') 3 | const request = require('request') 4 | 5 | let app 6 | before(() => { 7 | app = require('./app.js') 8 | global.host = 'http://localhost:' + app.server.address().port 9 | request.debug = false 10 | }) 11 | after((done) => { 12 | app.server.close(done) 13 | }) 14 | 15 | fs.readdirSync(path.join(__dirname, 'test')) 16 | .forEach(file => { 17 | require(path.join(__dirname, 'test', file)) 18 | }) -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/login.js: -------------------------------------------------------------------------------- 1 | // 邮箱登录 2 | 3 | const crypto = require('crypto') 4 | 5 | module.exports = (query, request) => { 6 | const data = { 7 | username: query.email, 8 | password: crypto.createHash('md5').update(query.password).digest('hex'), 9 | rememberLogin: 'true' 10 | } 11 | return request( 12 | 'POST', `https://music.163.com/weapi/login`, data, 13 | {crypto: 'weapi', ua: 'pc', cookie: query.cookie, proxy: query.proxy} 14 | ) 15 | } -------------------------------------------------------------------------------- /src/api/songs.js: -------------------------------------------------------------------------------- 1 | import myAxios from "common/js/axios" 2 | 3 | export function getCategoryData(){ 4 | var url = '/api/playlist/catlist'; //歌单分类tag 5 | // var url = '/api/playlist/detail?id=2664283969'; //歌单湘情 6 | // var url = '/api/top/playlist/highquality'; ?/精品歌单 7 | 8 | return myAxios(url) 9 | } 10 | 11 | export function getSongsData(type){ 12 | var url = '/api/top/playlist' 13 | var params = { 14 | cat:type 15 | } 16 | return myAxios(url,params) 17 | } -------------------------------------------------------------------------------- /src/api/rank.js: -------------------------------------------------------------------------------- 1 | import myAxios from "common/js/axios" 2 | 3 | export default function getRankData(){ 4 | // var url = '/api/toplist/artist'; 5 | // var url = '/api/discover/toplist?id=3778678'; 6 | // var url = '/api/top/artists?offset=0&limit=300'; 7 | // var url = '/api//artists?id=5781'; 8 | 9 | 10 | 11 | // var url = '/api/top/list?id=991319590'; //传榜单id获取歌曲列表等信息 12 | var url = '/api/toplist/detail'; //移动端带三个详情 13 | 14 | 15 | 16 | return myAxios(url) 17 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/search.js: -------------------------------------------------------------------------------- 1 | // 搜索 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | s: query.keywords, 6 | type: query.type || 1, // 1: 单曲, 10: 专辑, 100: 歌手, 1000: 歌单, 1002: 用户, 1004: MV, 1006: 歌词, 1009: 电台, 1014: 视频 7 | limit: query.limit || 30, 8 | offset: query.offset || 0 9 | } 10 | return request( 11 | 'POST', `https://music.163.com/weapi/search/get`, data, 12 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 13 | ) 14 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/dj_hot.js: -------------------------------------------------------------------------------- 1 | // 热门电台 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | cat: query.type, 6 | cateId: query.type, 7 | type: query.type, 8 | categoryId: query.type, 9 | category: query.type, 10 | limit: query.limit, 11 | offset: query.offset 12 | } 13 | return request( 14 | 'POST', `https://music.163.com/weapi/djradio/hot/v1`, data, 15 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 16 | ) 17 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/dj_program.js: -------------------------------------------------------------------------------- 1 | // 电台节目列表 2 | const { toBoolean } = require('../util') 3 | module.exports = (query, request) => { 4 | const data = { 5 | radioId: query.rid, 6 | limit: query.limit || 30, 7 | offset: query.offset || 0, 8 | asc: toBoolean(query.asc) 9 | } 10 | console.log(toBoolean(query.asc)) 11 | return request( 12 | 'POST', 13 | `https://music.163.com/weapi/dj/program/byradio`, 14 | data, 15 | { crypto: 'weapi', cookie: query.cookie, proxy: query.proxy } 16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/song_url.js: -------------------------------------------------------------------------------- 1 | // 歌曲链接 2 | 3 | const crypto = require('crypto') 4 | 5 | module.exports = (query, request) => { 6 | if(!('MUSIC_U' in query.cookie)) query.cookie._ntes_nuid = crypto.randomBytes(16).toString("hex") 7 | const data = { 8 | ids: '[' + query.id + ']', 9 | br: parseInt(query.br || 999000) 10 | } 11 | return request( 12 | 'POST', `https://music.163.com/weapi/song/enhance/player/url`, data, 13 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 14 | ) 15 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/top_playlist_highquality.js: -------------------------------------------------------------------------------- 1 | // 精品歌单 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | cat: query.cat || '全部', // 全部,华语,欧美,韩语,日语,粤语,小语种,运动,ACG,影视原声,流行,摇滚,后摇,古风,民谣,轻音乐,电子,器乐,说唱,古典,爵士 6 | limit: query.limit || 50, 7 | lasttime: query.before || 0, // 歌单updateTime 8 | total: true 9 | } 10 | return request( 11 | 'POST', `https://music.163.com/weapi/playlist/highquality/list`, data, 12 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 13 | ) 14 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/login_cellphone.js: -------------------------------------------------------------------------------- 1 | // 手机登录 2 | 3 | const crypto = require('crypto') 4 | 5 | module.exports = (query, request) => { 6 | const data = { 7 | phone: query.phone, 8 | countrycode: query.countrycode, 9 | password: crypto.createHash('md5').update(query.password).digest('hex'), 10 | rememberLogin: 'true' 11 | } 12 | return request( 13 | 'POST', `https://music.163.com/weapi/login/cellphone`, data, 14 | {crypto: 'weapi', ua: 'pc', cookie: query.cookie, proxy: query.proxy} 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/resource_like.js: -------------------------------------------------------------------------------- 1 | // 点赞与取消点赞资源 2 | 3 | module.exports = (query, request) => { 4 | query.t = (query.t == 1 ? 'like' : 'unlike') 5 | query.type = { 6 | 1: 'R_MV_5_', // MV 7 | 4: 'A_DJ_1_', // 电台 8 | 5: 'R_VI_62_' // 视频 9 | }[query.type] 10 | const data = { 11 | threadId: query.type + query.id 12 | } 13 | return request( 14 | 'POST', `https://music.163.com/weapi/resource/${query.t}`, data, 15 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 16 | ) 17 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/user_update.js: -------------------------------------------------------------------------------- 1 | // 编辑用户信息 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | avatarImgId: "0", 6 | birthday: query.birthday, 7 | city: query.city, 8 | gender: query.gender, 9 | nickname: query.nickname, 10 | province: query.province, 11 | signature: query.signature 12 | } 13 | return request( 14 | 'POST', `https://music.163.com/weapi/user/profile/update`, data, 15 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 16 | ) 17 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/like.js: -------------------------------------------------------------------------------- 1 | // 红心与取消红心歌曲 2 | const { toBoolean } = require('../util') 3 | 4 | module.exports = (query, request) => { 5 | query.like = query.like ? true : false 6 | const data = { 7 | trackId: query.id, 8 | like: query.like 9 | } 10 | return request( 11 | 'POST', 12 | `https://music.163.com/weapi/radio/like?alg=${query.alg || 13 | 'itembased'}&trackId=${query.id}&like=${query.like}&time=${query.time || 14 | 25}`, 15 | data, 16 | { crypto: 'weapi', cookie: query.cookie, proxy: query.proxy } 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /src/api/music.js: -------------------------------------------------------------------------------- 1 | import myAxios from "common/js/axios" 2 | 3 | export function getMusicDetailData(id){ 4 | var url= "api/song/detail" 5 | var params = { 6 | ids:id 7 | } 8 | return myAxios(url, params) 9 | } 10 | export function getMusicUrlData(id){ 11 | var url= "api/song/url" //歌曲的url 12 | var params = { 13 | id 14 | } 15 | return myAxios(url, params) 16 | 17 | } 18 | 19 | export function getMusicLyricData(id){ 20 | var url= "api/lyric" 21 | var params = { 22 | id 23 | } 24 | return myAxios(url, params) 25 | 26 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/test/album.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert') 2 | const request = require('request') 3 | const host = global.host || 'http://localhost:3000' 4 | 5 | describe('测试获取歌手专辑列表是否正常', () => { 6 | it('数据的 code 应该为200', done => { 7 | const qs = { 8 | id: 32311 9 | } 10 | 11 | request.get({url: `${host}/album`,qs: qs}, (err, res, body) => { 12 | if (!err && res.statusCode == 200) { 13 | body = JSON.parse(body) 14 | assert(body.code === 200) 15 | done() 16 | } 17 | else{ 18 | done(err) 19 | } 20 | }) 21 | }) 22 | }) 23 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/test/comment.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert') 2 | const request = require('request') 3 | const host = global.host || 'http://localhost:3000' 4 | 5 | describe('测试获取评论是否正常', () => { 6 | it('数据的 code 应该为200', done => { 7 | const qs = { 8 | id: 32311 9 | } 10 | 11 | request.get({url: `${host}/comment/album`,qs: qs}, (err, res, body) => { 12 | if (!err && res.statusCode == 200) { 13 | body = JSON.parse(body) 14 | assert(body.code === 200) 15 | done() 16 | } 17 | else{ 18 | done(err) 19 | } 20 | }) 21 | }) 22 | }) 23 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/test/lyric.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert') 2 | const request = require('request') 3 | const host = global.host || 'http://localhost:3000' 4 | 5 | describe("测试获取歌词是否正常", () => { 6 | it("数据应该有 lrc 字段", done => { 7 | const qs = { 8 | id: 347230 9 | } 10 | 11 | request.get({url: `${host}/lyric`,qs: qs}, (err, res, body) => { 12 | if (!err && res.statusCode == 200) { 13 | body = JSON.parse(body) 14 | assert(typeof body.lrc !== "undefined") 15 | done() 16 | } 17 | else{ 18 | done(err) 19 | } 20 | }) 21 | }) 22 | }) 23 | -------------------------------------------------------------------------------- /src/api/songList.js: -------------------------------------------------------------------------------- 1 | import myAxios from "common/js/axios" 2 | 3 | export function getMixListData(id){ 4 | var url = 'api/playlist/detail' 5 | var params = { 6 | id 7 | } 8 | return myAxios(url,params) 9 | } 10 | 11 | export function getRankListData(id){ 12 | var url = 'api/top/list' 13 | var params = { 14 | id 15 | } 16 | return myAxios(url,params) 17 | } 18 | 19 | export function getSingerListData(id){ 20 | var url = 'api/artists' 21 | // var url = 'api/artist/desc' //获取歌手描述API 22 | var params = { 23 | id 24 | } 25 | return myAxios(url,params) 26 | } -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | import store from './store/index' 5 | import fastClick from 'fastclick' 6 | import lazyLoad from "vue-lazyload" 7 | 8 | fastClick.attach(document.body) 9 | Vue.config.productionTip = false 10 | Vue.use(lazyLoad,{ 11 | loading: require('./assets/lazy3.png'), 12 | }) 13 | 14 | new Vue({ 15 | router, 16 | store, 17 | render: h => h(App), 18 | }).$mount('#app') 19 | 20 | 21 | // new Vue({ 22 | // el:"#app", 23 | // router, 24 | // store, 25 | // template: '' , 26 | // components: { App } 27 | // }) 28 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/daily_signin.js: -------------------------------------------------------------------------------- 1 | // 签到 2 | 3 | /* 4 | 0为安卓端签到 3点经验, 1为网页签到,2点经验 5 | 签到成功 {'android': {'point': 3, 'code': 200}, 'web': {'point': 2, 'code': 200}} 6 | 重复签到 {'android': {'code': -2, 'msg': '重复签到'}, 'web': {'code': -2, 'msg': '重复签到'}} 7 | 未登录 {'android': {'code': 301}, 'web': {'code': 301}} 8 | */ 9 | 10 | module.exports = (query, request) => { 11 | const data = { 12 | type: query.type || 0 13 | } 14 | return request( 15 | 'POST', `https://music.163.com/weapi/point/dailyTask`, data, 16 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 17 | ) 18 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/test/music_url.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert') 2 | const request = require('request') 3 | const host = global.host || 'http://localhost:3000' 4 | 5 | describe("测试获取歌曲是否正常", () => { 6 | it("歌曲的 url 不应该为空", done => { 7 | const qs = { 8 | id: 462791935, 9 | br: 999000 10 | } 11 | 12 | request.get({url: `${host}/music/url`,qs: qs}, (err, res, body) => { 13 | if (!err && res.statusCode == 200) { 14 | body = JSON.parse(body) 15 | assert(!!body.data[0].url) 16 | done() 17 | } 18 | else{ 19 | done(err) 20 | } 21 | }) 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/test/search.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert') 2 | const request = require('request') 3 | const host = global.host || 'http://localhost:3000' 4 | 5 | describe('测试搜索是否正常', () => { 6 | it('获取到的数据的 name 应该和搜索关键词一致', done => { 7 | const qs = { 8 | keywords: '海阔天空', 9 | type: 1 10 | } 11 | request.get({url: `${host}/search`,qs: qs}, (err, res, body) => { 12 | if (!err && res.statusCode == 200) { 13 | body = JSON.parse(body) 14 | assert(body.result.songs[0].name === '海阔天空') 15 | done() 16 | } 17 | else{ 18 | done(err) 19 | } 20 | }) 21 | }) 22 | }) 23 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | iDoMusic 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/api/search.js: -------------------------------------------------------------------------------- 1 | import myAxios from 'common/js/axios' 2 | 3 | export function getHotRecSearchData(){ 4 | var url = 'api/search/hot' 5 | return myAxios(url) 6 | } 7 | 8 | export function getRecSearchData(keywords){ 9 | var params = { 10 | keywords, 11 | type:'mobile' 12 | } 13 | var url = 'api/search/suggest' 14 | return myAxios(url,params) 15 | } 16 | 17 | export function getSearchData(keywords,type=0){ 18 | var obj = [1,100,1000] 19 | var parmas = { 20 | keywords, 21 | limit:50, 22 | type:obj[type] 23 | } 24 | var url = 'api/search/' 25 | return myAxios(url,parmas) 26 | } -------------------------------------------------------------------------------- /src/store/mutations.js: -------------------------------------------------------------------------------- 1 | const mutations = { 2 | set_showPlayer(state, status){ 3 | state.showPlayer = status 4 | }, 5 | set_playList(state, list){ 6 | state.playList = list 7 | }, 8 | set_currentIndex(state, num){ 9 | state.currentIndex = num 10 | }, 11 | set_playStatus(state, module){ 12 | state.playStatus = module 13 | }, 14 | set_sequenceList(state, list){ 15 | state.sequenceList = list 16 | }, 17 | set_mode(state, mode){ 18 | state.mode = mode 19 | }, 20 | set_musicId(state, id){ 21 | state.musicId = id 22 | } 23 | } 24 | 25 | export default mutations; -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/playlist_update.js: -------------------------------------------------------------------------------- 1 | // 编辑歌单 2 | 3 | module.exports = (query, request) => { 4 | query.cookie.os = 'pc' 5 | query.desc = query.desc || '' 6 | query.tags = query.tags || '' 7 | const data = { 8 | "/api/playlist/desc/update": `{"id":${query.id},"desc":"${query.desc}"}`, 9 | "/api/playlist/tags/update": `{"id":${query.id},"tags":"${query.tags}"}`, 10 | "/api/playlist/update/name": `{"id":${query.id},"name":"${query.name}"}` 11 | } 12 | return request( 13 | 'POST', `https://music.163.com/weapi/batch`, data, 14 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 15 | ) 16 | } -------------------------------------------------------------------------------- /src/store/getters.js: -------------------------------------------------------------------------------- 1 | export const showPlayer = state => state.showPlayer 2 | export const playList = state => state.playList 3 | export const currentIndex = state => state.currentIndex 4 | export const playStatus = state => state.playStatus 5 | export const mode = state => state.mode 6 | export const musicId = state => state.musicId 7 | 8 | // export const sequenceList = state => state.sequenceList 9 | 10 | export const sequenceList = state => state.sequenceList 11 | 12 | function sortList(mode,list){ 13 | if(mode !== 'random'){ 14 | return list 15 | }else{ 16 | return list.sort((a,b) => { 17 | return Math.random() - 0.5; 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import * as getters from './getters' 4 | import * as actions from './actions' 5 | import state from './state' 6 | import mutations from './mutations' 7 | import createLogger from 'vuex/dist/logger'//vuex的dist目录下有一个logger,通过这个可以再控制台记录state修改的日志 8 | 9 | 10 | Vue.use(Vuex) 11 | 12 | // const debug = process.env.NODE_ENV !== 'production'//判断是否是在开发环境 13 | export default new Vuex.Store({ 14 | getters, 15 | actions, 16 | state, 17 | mutations, 18 | // strict: debug,//如果是在开发环境,debug为true,也就开启了严格模式,它会检测你state的修改是否来自于mutations,如果不是,会报一个警告 19 | plugins: [createLogger()] //插件,日志 20 | }) 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/scrobble.js: -------------------------------------------------------------------------------- 1 | // 听歌打卡 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | logs: JSON.stringify([{ 6 | action: 'play', 7 | json: { 8 | download: 0, 9 | end: 'playend', 10 | id: query.songid, 11 | sourceId: query.sourceid, 12 | time: query.time, 13 | type: 'song', 14 | wifi: 0, 15 | } 16 | }]) 17 | } 18 | return request( 19 | 'POST', `https://music.163.com/weapi/feedback/weblog`, data, 20 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/test/login.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert') 2 | const request = require('request') 3 | const host = global.host || 'http://localhost:3000' 4 | 5 | console.log("注意: 测试登录需在 test/login.test.js 中填写账号密码!!!"); 6 | 7 | describe("测试登录是否正常", () => { 8 | it("手机登录 code 应该等于200", done => { 9 | const qs = { 10 | phone: phone, 11 | password: password 12 | } 13 | 14 | request.get({url: `${host}/login/cellphone`,qs: qs}, (err, res, body) => { 15 | if (!err && res.statusCode == 200) { 16 | body = JSON.parse(body) 17 | assert(body.code === 200) 18 | done() 19 | } 20 | else{ 21 | done(err) 22 | } 23 | }) 24 | }) 25 | }) 26 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/comment_hot.js: -------------------------------------------------------------------------------- 1 | // 热门评论 2 | 3 | module.exports = (query, request) => { 4 | query.cookie.os = 'pc' 5 | query.type = { 6 | 0: 'R_SO_4_', // 歌曲 7 | 1: 'R_MV_5_', // MV 8 | 2: 'A_PL_0_', // 歌单 9 | 3: 'R_AL_3_', // 专辑 10 | 4: 'A_DJ_1_', // 电台, 11 | 5: 'R_VI_62_' // 视频 12 | }[query.type] 13 | const data = { 14 | rid: query.id, 15 | limit: query.limit || 20, 16 | offset: query.offset || 0 17 | } 18 | return request( 19 | 'POST', `https://music.163.com/weapi/v1/resource/hotcomments/${query.type}${query.id}`, data, 20 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 21 | ) 22 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/dj_recommend_type.js: -------------------------------------------------------------------------------- 1 | // 精选电台分类 2 | 3 | /* 4 | 有声书 10001 5 | 知识技能 453050 6 | 商业财经 453051 7 | 人文历史 11 8 | 外语世界 13 9 | 亲子宝贝 14 10 | 创作|翻唱 2001 11 | 音乐故事 2 12 | 3D|电子 10002 13 | 相声曲艺 8 14 | 情感调频 3 15 | 美文读物 6 16 | 脱口秀 5 17 | 广播剧 7 18 | 二次元 3001 19 | 明星做主播 1 20 | 娱乐|影视 4 21 | 科技科学 453052 22 | 校园|教育 4001 23 | 旅途|城市 12 24 | */ 25 | 26 | module.exports = (query, request) => { 27 | const data = { 28 | cateId: query.type 29 | } 30 | return request( 31 | 'POST', `https://music.163.com/weapi/djradio/recommend`, data, 32 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 33 | ) 34 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/comment_like.js: -------------------------------------------------------------------------------- 1 | // 点赞与取消点赞评论 2 | 3 | module.exports = (query, request) => { 4 | query.cookie.os = 'pc' 5 | query.t = (query.t == 1 ? 'like' : 'unlike') 6 | query.type = { 7 | 0: 'R_SO_4_', // 歌曲 8 | 1: 'R_MV_5_', // MV 9 | 2: 'A_PL_0_', // 歌单 10 | 3: 'R_AL_3_', // 专辑 11 | 4: 'A_DJ_1_', // 电台, 12 | 5: 'R_VI_62_' // 视频 13 | }[query.type] 14 | const data = { 15 | threadId: query.type + query.id, 16 | commentId: query.cid 17 | } 18 | return request( 19 | 'POST', `https://music.163.com/weapi/v1/comment/${query.t}`, data, 20 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 21 | ) 22 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NeteaseCloudMusicApi", 3 | "version": "3.4.0", 4 | "description": "网易云音乐 NodeJS 版 API", 5 | "scripts": { 6 | "start": "node app.js", 7 | "test": "mocha -r intelli-espower-loader -t 20000 app.test.js --exit" 8 | }, 9 | "keywords": [ 10 | "网易云音乐", 11 | "网易云", 12 | "音乐", 13 | "网易云音乐nodejs" 14 | ], 15 | "author": "", 16 | "license": "MIT", 17 | "dependencies": { 18 | "apicache": "^1.2.1", 19 | "express": "^4.16.3", 20 | "pac-proxy-agent": "^3.0.0", 21 | "request": "^2.85.0" 22 | }, 23 | "devDependencies": { 24 | "intelli-espower-loader": "^1.0.1", 25 | "mocha": "^5.1.1", 26 | "power-assert": "^1.5.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/top_playlist.js: -------------------------------------------------------------------------------- 1 | // 分类歌单 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | cat: query.cat || '全部', // 全部,华语,欧美,日语,韩语,粤语,小语种,流行,摇滚,民谣,电子,舞曲,说唱,轻音乐,爵士,乡村,R&B/Soul,古典,民族,英伦,金属,朋克,蓝调,雷鬼,世界音乐,拉丁,另类/独立,New Age,古风,后摇,Bossa Nova,清晨,夜晚,学习,工作,午休,下午茶,地铁,驾车,运动,旅行,散步,酒吧,怀旧,清新,浪漫,性感,伤感,治愈,放松,孤独,感动,兴奋,快乐,安静,思念,影视原声,ACG,儿童,校园,游戏,70后,80后,90后,网络歌曲,KTV,经典,翻唱,吉他,钢琴,器乐,榜单,00后 6 | order: query.order || 'hot', // hot,new 7 | limit: query.limit || 50, 8 | offset: query.offset || 0, 9 | total: true 10 | } 11 | return request( 12 | 'POST', `https://music.163.com/weapi/playlist/list`, data, 13 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 14 | ) 15 | } -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | configureWebpack: { 3 | resolve: { 4 | alias: { //路径名替换,@已经内置配置好为src 5 | 'components': '@/components', 6 | 'assets': '@/assets', 7 | 'common': '@/common', 8 | 'api': '@/api', 9 | 'base': '@/base' 10 | } 11 | }, 12 | }, 13 | // baseUrl:'/', 14 | devServer: { 15 | open: true, //自动打开浏览器页面 16 | port: 8081, //端口 17 | proxy: { 18 | '/api': { 19 | target: ' http://localhost:3000', 20 | pathRewrite: { 21 | '^/api': '/' 22 | } 23 | } 24 | }, 25 | }, 26 | 27 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/login_status.js: -------------------------------------------------------------------------------- 1 | // 登录状态 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'GET', `https://music.163.com`, {}, 6 | {cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | .then(response => { 9 | try{ 10 | let profile = eval(`(${/GUser\s*=\s*([^;]+);/.exec(response.body)[1]})`) 11 | let bindings = eval(`(${/GBinds\s*=\s*([^;]+);/.exec(response.body)[1]})`) 12 | response.body = {code: 200, profile: profile, bindings: bindings} 13 | return response 14 | } 15 | catch(err){ 16 | response.status = 301 17 | response.body = {code: 301} 18 | return Promise.reject(response) 19 | } 20 | }) 21 | } -------------------------------------------------------------------------------- /src/common/js/dom.js: -------------------------------------------------------------------------------- 1 | export default function addClass(dom, className){ 2 | if(hasName(dom, className)){ 3 | return 4 | } 5 | let classNameArr = dom.className.split(' ') 6 | classNameArr.push('slider-item') 7 | if(classNameArr[0] == ''){ //没有calssName的情况会匹配出一个空串' ' 8 | classNameArr.shift() 9 | } 10 | dom.className = classNameArr.join(' ') 11 | } 12 | 13 | function hasName(dom, className){ 14 | let reg = new RegExp('(^|\\s)' + className + '(\\s|$)') 15 | return reg.test(dom.className) 16 | } 17 | 18 | export function getData(el,type,val){ 19 | const prefix = 'data-' 20 | if (val) { 21 | return el.setAttribute(prefix + type, val) 22 | } 23 | return el.getAttribute(prefix + type) //获取到的这个值是一个字符串,!!!!一定要做类型转换处理 24 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/comment.js: -------------------------------------------------------------------------------- 1 | // 发送与删除评论 2 | 3 | module.exports = (query, request) => { 4 | query.cookie.os = 'pc' 5 | query.t = (query.t == 1 ? 'add' : 'delete') 6 | query.type = { 7 | 0: 'R_SO_4_', // 歌曲 8 | 1: 'R_MV_5_', // MV 9 | 2: 'A_PL_0_', // 歌单 10 | 3: 'R_AL_3_', // 专辑 11 | 4: 'A_DJ_1_', // 电台, 12 | 5: 'R_VI_62_' // 视频 13 | }[query.type] 14 | const data = { 15 | threadId: query.type + query.id 16 | } 17 | if(query.t == 'add') 18 | data.content = query.content 19 | else if(query.t == 'delete') 20 | data.commentId = query.commentId 21 | return request( 22 | 'POST', `https://music.163.com/weapi/resource/comments/${query.t}`, data, 23 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 24 | ) 25 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/artist_list.js: -------------------------------------------------------------------------------- 1 | // 歌手分类 2 | 3 | /* 4 | categoryCode 取值 5 | 入驻歌手 5001 6 | 华语男歌手 1001 7 | 华语女歌手 1002 8 | 华语组合/乐队 1003 9 | 欧美男歌手 2001 10 | 欧美女歌手 2002 11 | 欧美组合/乐队 2003 12 | 日本男歌手 6001 13 | 日本女歌手 6002 14 | 日本组合/乐队 6003 15 | 韩国男歌手 7001 16 | 韩国女歌手 7002 17 | 韩国组合/乐队 7003 18 | 其他男歌手 4001 19 | 其他女歌手 4002 20 | 其他组合/乐队 4003 21 | 22 | initial 取值 a-z/A-Z 23 | */ 24 | 25 | module.exports = (query, request) => { 26 | const data = { 27 | categoryCode: query.cat || '1001', 28 | initial: (query.initial || '').toUpperCase().charCodeAt() || '', 29 | offset: query.offset || 0, 30 | limit: query.limit || 30, 31 | total: true 32 | } 33 | return request( 34 | 'POST', `https://music.163.com/weapi/artist/list`, data, 35 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 36 | ) 37 | } -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/check_music.js: -------------------------------------------------------------------------------- 1 | // 歌曲可用性 2 | 3 | module.exports = (query, request) => { 4 | const data = { 5 | ids: '[' + parseInt(query.id) + ']', 6 | br: parseInt(query.br || 999000) 7 | } 8 | return request( 9 | 'POST', `https://music.163.com/weapi/song/enhance/player/url`, data, 10 | {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} 11 | ) 12 | .then(response => { 13 | let playable = false 14 | if(response.body.code == 200){ 15 | if(response.body.data[0].code == 200){ 16 | playable = true 17 | } 18 | } 19 | if(playable){ 20 | response.body = {success: true, message: 'ok'} 21 | return response 22 | } 23 | else{ 24 | response.status = 404 25 | response.body = {success: false, message: '亲爱的,暂无版权'} 26 | return Promise.reject(response) 27 | } 28 | }) 29 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "idomusic", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "axios": "^0.18.0", 12 | "better-scroll": "^1.12.6", 13 | "fastclick": "^1.0.6", 14 | "good-storage": "^1.1.0", 15 | "lyric-parser": "^1.0.1", 16 | "vue": "^2.5.22", 17 | "vue-lazyload": "^1.2.6", 18 | "vue-router": "^3.0.1", 19 | "vuex": "^3.0.1" 20 | }, 21 | "devDependencies": { 22 | "@vue/cli-plugin-babel": "^3.4.0", 23 | "@vue/cli-plugin-eslint": "^3.4.0", 24 | "@vue/cli-service": "^3.4.0", 25 | "@vue/eslint-config-standard": "^4.0.0", 26 | "babel-eslint": "^10.0.1", 27 | "eslint": "^5.8.0", 28 | "eslint-plugin-vue": "^5.0.0", 29 | "stylus": "^0.54.5", 30 | "stylus-loader": "^3.0.2", 31 | "vue-template-compiler": "^2.5.21" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 网易云音乐 NodeJS 版 API 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 23 | 24 | 29 | 30 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/public/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | test 9 | 10 | 11 | 12 | 13 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2016 Binaryify 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 13 | all 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 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /src/base/gridLists.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | // 25 | 26 | 42 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 网易云音乐 API 8 | 9 | 10 |

网易云音乐 API

11 | 当你看到这个页面时,这个服务已经成功跑起来了~ 12 | 查看文档 13 |

例子:

14 | 19 | 47 | 48 | -------------------------------------------------------------------------------- /src/base/popup.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 34 | 35 | 50 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/top_list.js: -------------------------------------------------------------------------------- 1 | // 排行榜 2 | 3 | const topList = { 4 | 0: "3779629", //云音乐新歌榜 5 | 1: "3778678", //云音乐热歌榜 6 | 2: "2884035", ///云音乐原创榜 7 | 3: "19723756", //云音乐飙升榜 8 | 4: "10520166", //云音乐电音榜 9 | 5: "180106", //UK排行榜周榜 10 | 6: "60198", //美国Billboard周榜 11 | 7: "21845217", //KTV嗨榜 12 | 8: "11641012", //iTunes榜 13 | 9: "120001", //Hit FM Top榜 14 | 10: "60131", //日本Oricon周榜 15 | 11: "3733003", //韩国Melon排行榜周榜 16 | 12: "60255", //韩国Mnet排行榜周榜 17 | 13: "46772709", //韩国Melon原声周榜 18 | 14: "112504", //中国TOP排行榜(港台榜) 19 | 15: "64016", //中国TOP排行榜(内地榜) 20 | 16: "10169002", //香港电台中文歌曲龙虎榜 21 | 17: "4395559", //华语金曲榜 22 | 18: "1899724", //中国嘻哈榜 23 | 19: "27135204", //法国 NRJ EuroHot 30周榜 24 | 20: "112463", //台湾Hito排行榜 25 | 21: "3812895", //Beatport全球电子舞曲榜 26 | 22: "71385702", //云音乐ACG音乐榜 27 | 23: "991319590" //云音乐嘻哈榜 28 | } 29 | 30 | module.exports = (query, request) => { 31 | const data = { 32 | // id: topList[query.idx], 33 | id: query.id, //20190216-by:小伤伤(为了直接对应请求回来的排行榜分类中的id) 34 | n: 10000 35 | } 36 | return request( 37 | 'POST', `https://music.163.com/weapi/v3/playlist/detail`, data, 38 | {crypto: 'linuxapi', cookie: query.cookie, proxy: query.proxy} 39 | ) 40 | } -------------------------------------------------------------------------------- /src/base/loading.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 25 | 26 | 50 | -------------------------------------------------------------------------------- /src/common/js/cache.js: -------------------------------------------------------------------------------- 1 | import storage from 'good-storage' 2 | 3 | 4 | const STORAGE_MAX_LENTH = 20 5 | const SEARCH_KEY = '_searchData_' 6 | 7 | export function getSearchHistory () { //获取storage,如果没有则返回空数组一枚 8 | return storage.get(SEARCH_KEY, []) 9 | } 10 | 11 | export function setSearchHistory (val) { //保存记录,返回保存后的新数组 12 | var arr = getSearchHistory() 13 | insetHistory(arr,val,item => { 14 | return item === val 15 | },STORAGE_MAX_LENTH) 16 | storage.set(SEARCH_KEY, arr) 17 | return arr 18 | } 19 | 20 | export function deleteSearchHistory (index) { //删除某条数据,并返回删除后的新数组 21 | var arr = getSearchHistory() 22 | cutOutHistory(arr,index) 23 | storage.set(SEARCH_KEY, arr) 24 | return arr 25 | } 26 | 27 | export function clearSearchHistory (){ //清除后返回一个空数组 28 | storage.remove(SEARCH_KEY) 29 | return [] 30 | } 31 | 32 | 33 | 34 | function cutOutHistory(arr,index){ //传入arr跟val及匹配index规则,删除对应val 35 | index > -1 ? arr.splice(index, 1) : '' 36 | } 37 | 38 | function insetHistory(arr, val , compare, lenMax){ //整个插入逻辑,(插入的) 39 | let index = arr.findIndex(compare) 40 | if(index == 0){ 41 | return 42 | } 43 | index > -1 ? arr.splice(index, 1) : '' 44 | arr.unshift(val) 45 | lenMax && arr.length > lenMax ? arr.pop() : '' 46 | } 47 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/module/related_playlist.js: -------------------------------------------------------------------------------- 1 | // 相关歌单 2 | 3 | module.exports = (query, request) => { 4 | return request( 5 | 'GET', `https://music.163.com/playlist?id=${query.id}`, {}, 6 | {ua: 'pc', cookie: query.cookie, proxy: query.proxy} 7 | ) 8 | .then(response => { 9 | try{ 10 | const pattern = /
[\s\S]*?[\s\S]*?]*>([^<]+?)<\/a>[\s\S]*?]*>([^<]+?)<\/a>/g; 11 | let result, playlists = [] 12 | while((result = pattern.exec(response.body)) != null){ 13 | playlists.push({ 14 | creator: { 15 | userId: result[4].slice('/user/home?id='.length), 16 | nickname: result[5] 17 | }, 18 | coverImgUrl: result[1].slice(0,-('?param=50y50'.length)), 19 | name: result[3], 20 | id: result[2].slice('/playlist?id='.length) 21 | }) 22 | } 23 | response.body = {code: 200, playlists: playlists} 24 | return response 25 | } 26 | catch(err){ 27 | response.status = 500 28 | response.body = {code: 500, msg: err.stack} 29 | return Promise.reject(response) 30 | } 31 | }) 32 | } 33 | -------------------------------------------------------------------------------- /src/components/tab/tab.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 26 | 27 | 55 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/util/crypto.js: -------------------------------------------------------------------------------- 1 | const crypto = require('crypto') 2 | const iv = Buffer.from('0102030405060708') 3 | const presetKey = Buffer.from('0CoJUm6Qyw8W8jud') 4 | const linuxapiKey = Buffer.from('rFgB&h#%2?^eDg:Q') 5 | const base62 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' 6 | const publicKey = '-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDgtQn2JZ34ZC28NWYpAUd98iZ37BUrX/aKzmFbt7clFSs6sXqHauqKWqdtLkF2KexO40H1YTX8z2lSgBBOAxLsvaklV8k4cBFK9snQXE9/DDaFt6Rr7iVZMldczhC0JNgTz+SHXT6CBHuX3e9SdB1Ua44oncaTWz7OBGLbCiK45wIDAQAB\n-----END PUBLIC KEY-----' 7 | 8 | const aesEncrypt = (buffer, mode, key, iv) => { 9 | const cipher = crypto.createCipheriv('aes-128-' + mode, key, iv) 10 | return Buffer.concat([cipher.update(buffer),cipher.final()]) 11 | } 12 | 13 | const rsaEncrypt = (buffer, key) => { 14 | buffer = Buffer.concat([Buffer.alloc(128 - buffer.length), buffer]) 15 | return crypto.publicEncrypt({key: key, padding: crypto.constants.RSA_NO_PADDING}, buffer) 16 | } 17 | 18 | const weapi = (object) => { 19 | const text = JSON.stringify(object) 20 | const secretKey = crypto.randomBytes(16).map(n => (base62.charAt(n % 62).charCodeAt())) 21 | return { 22 | params: aesEncrypt(Buffer.from(aesEncrypt(Buffer.from(text), 'cbc', presetKey, iv).toString('base64')), 'cbc', secretKey, iv).toString('base64'), 23 | encSecKey: rsaEncrypt(secretKey.reverse(), publicKey).toString('hex') 24 | } 25 | } 26 | 27 | const linuxapi = (object) => { 28 | const text = JSON.stringify(object) 29 | return { 30 | eparams: aesEncrypt(Buffer.from(text), 'ecb', linuxapiKey, '').toString('hex').toUpperCase() 31 | } 32 | } 33 | 34 | module.exports = {weapi, linuxapi} -------------------------------------------------------------------------------- /src/common/js/creatListData.js: -------------------------------------------------------------------------------- 1 | export class _creatGridData { 2 | constructor(url, count, title, name, id, showPlayCount, showTitle, showCreatorIcon,type) { 3 | this.imageUrl = url; 4 | this.playCount = count; 5 | this.title = title; 6 | this.titleName = name; 7 | this.id = id; 8 | this.showPlayCount = showPlayCount; 9 | this.showTitle = showTitle; 10 | this.showCreatorIcon = showCreatorIcon; 11 | this.type=type 12 | } 13 | } 14 | 15 | export class _creatListData { 16 | constructor(url, name, album, id, type) { 17 | this.imageUrl = url; 18 | this.name = name; 19 | this.album = album; 20 | this.id = id; 21 | this.type = type 22 | } 23 | } 24 | 25 | export function filterSinger(singer,alboum){ 26 | var singerArr = [] 27 | singer.forEach((item) => { 28 | singerArr.push(item.name) 29 | }) 30 | var str = singerArr.join('/') + ' - ' + alboum 31 | return str 32 | } 33 | 34 | export const DATA_TYPE = ["Song",'Singer','Mix'] 35 | 36 | 37 | // export default function _creatGridData(data, url, count, title, name, id, showPlayCount = false, showCreatorIcon = false, showTitle = false) { 38 | // var newData = []; 39 | // var nameArr = []; 40 | // var _arguments = arguments 41 | // console.log(arguments) 42 | // newData.forEach.call(arguments, ((item, index) => { 43 | // if (typeof item == 'string' && item.indexOf('.') !== -1) { 44 | // var temp = item.split('.') 45 | // temp.push(index) 46 | // } 47 | // })) 48 | 49 | // data.forEach((item, index) => { 50 | 51 | // // getDetail(item, temp) 52 | // newData.push(new _creatGridData(item[url], item[count], item['creator.nickname'], item[name], item[id], showPlayCount, showCreatorIcon, showTitle)) 53 | // }) 54 | // console.log(newData) 55 | // return newData; 56 | // } 57 | 58 | // function getDetail(item, temp) { 59 | // console.log(temp) 60 | 61 | // } 62 | 63 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 44 | 45 | 46 | 86 | -------------------------------------------------------------------------------- /src/router.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue" 2 | import Router from "vue-router" 3 | Vue.use(Router) 4 | 5 | import Recommend from "components/recommend/recommend" 6 | import Songs from "components/songs/songs" 7 | import Rank from "components/rank/rank" 8 | import Singer from "components/singer/singer" 9 | import MusicList from 'base/MusicList' 10 | import SongListPage from 'components/songListPage/songListPage' 11 | 12 | export default new Router({ 13 | routes:[ 14 | { 15 | path:'/', 16 | redirect:'/recommend' 17 | }, 18 | { 19 | path:'/recommend', 20 | meta:{index:0}, 21 | component:Recommend 22 | }, 23 | { 24 | path:"/songs", 25 | meta:{index:1}, 26 | component:Songs, 27 | // beforeEnter: (to, from ,next) => { 28 | // // console.log(1111) 29 | // next() 30 | // } 31 | }, 32 | { 33 | path:'/rank', 34 | meta:{index:2}, 35 | component:Rank 36 | }, 37 | { 38 | path:'/singer', 39 | meta:{index:3}, 40 | component: Singer 41 | }, 42 | { 43 | path:'/songListPage', 44 | meta:{index:4}, 45 | name:'songListPage', 46 | component: SongListPage 47 | }, 48 | // { 49 | // path:'/player', 50 | // meta:{index:5}, 51 | // name:'player', 52 | // components: {player:player} 53 | // } 54 | 55 | 56 | 57 | 58 | 59 | // { 60 | // path:'/searchType', 61 | // components:{ 62 | // search:MusicList 63 | // }, 64 | // children:[ 65 | // { 66 | // path:'/searchtypesSong', 67 | // component:MusicList 68 | // }, 69 | // { 70 | // path:'/searchtypesSinger', 71 | // component:MusicList 72 | // }, 73 | // { 74 | // path:'/searchtypesMix', 75 | // component:MusicList 76 | // }, 77 | // ] 78 | // } 79 | ] 80 | }) -------------------------------------------------------------------------------- /src/common/js/singerTypeData.js: -------------------------------------------------------------------------------- 1 | export {_singerTypeData} 2 | var _singerTypeData = { 3 | fathers:[ 4 | { 5 | fatherNum:-1, 6 | fatherName:"推荐歌手" 7 | }, 8 | { 9 | fatherNum:0, 10 | fatherName:"华语" 11 | }, 12 | { 13 | fatherNum:1, 14 | fatherName:"欧美" 15 | }, 16 | { 17 | fatherNum:2, 18 | fatherName:"日本" 19 | }, 20 | { 21 | fatherNum:3, 22 | fatherName:"韩国" 23 | }, 24 | { 25 | fatherNum:4, 26 | fatherName:"其他" 27 | } 28 | ], 29 | children:[ 30 | { 31 | name:'华语男歌手', 32 | category:0, 33 | resourceType:1001 34 | }, 35 | { 36 | name:'华语女歌手', 37 | category:0, 38 | resourceType:1002 39 | }, 40 | { 41 | name:'华语组合/乐队', 42 | category:0, 43 | resourceType:1003 44 | }, 45 | { 46 | name:'欧美男歌手', 47 | category:1, 48 | resourceType:2001 49 | }, 50 | { 51 | name:'欧美女歌手', 52 | category:1, 53 | resourceType:2002 54 | }, 55 | { 56 | name:'欧美组合/乐队', 57 | category:1, 58 | resourceType:2003 59 | }, 60 | { 61 | name:'日本男歌手', 62 | category:2, 63 | resourceType:6001 64 | }, 65 | { 66 | name:'日本女歌手', 67 | category:2, 68 | resourceType:6002 69 | }, 70 | { 71 | name:'日本组合/乐队', 72 | category:2, 73 | resourceType:6003 74 | }, 75 | { 76 | name:'韩国男歌手', 77 | category:3, 78 | resourceType:7001 79 | }, 80 | { 81 | name:'韩国女歌手', 82 | category:3, 83 | resourceType:7002 84 | }, 85 | { 86 | name:'韩国组合/乐队', 87 | category:3, 88 | resourceType:7003 89 | }, 90 | { 91 | name:'其他男歌手', 92 | category:4, 93 | resourceType:4001 94 | }, 95 | { 96 | name:'其他女歌手', 97 | category:4, 98 | resourceType:4002 99 | }, 100 | { 101 | name:'其他组合/乐队', 102 | category:4, 103 | resourceType:4003 104 | }, 105 | ] 106 | } -------------------------------------------------------------------------------- /src/base/myScroll.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 104 | 105 | 108 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/app.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const path = require('path') 3 | const express = require('express') 4 | const bodyParser = require('body-parser') 5 | const request = require('./util/request') 6 | const package = require('./package.json') 7 | const exec = require('child_process').exec 8 | const cache = require('apicache').middleware 9 | 10 | // version check 11 | exec('npm info NeteaseCloudMusicApi version', (err, stdout, stderr) => { 12 | if(!err){ 13 | let version = stdout.trim() 14 | if(package.version < version){ 15 | console.log(`最新版本: ${version}, 当前版本: ${package.version}, 请及时更新`) 16 | } 17 | } 18 | }) 19 | 20 | const app = express() 21 | 22 | // CORS 23 | app.use((req, res, next) => { 24 | if(req.path !== '/' && !req.path.includes('.')){ 25 | res.header({ 26 | 'Access-Control-Allow-Credentials': true, 27 | 'Access-Control-Allow-Origin': req.headers.origin || '*', 28 | 'Access-Control-Allow-Headers': 'X-Requested-With', 29 | 'Access-Control-Allow-Methods': 'PUT,POST,GET,DELETE,OPTIONS', 30 | 'Content-Type': 'application/json; charset=utf-8' 31 | }) 32 | } 33 | next() 34 | }) 35 | 36 | // cookie parser 37 | app.use((req, res, next) => { 38 | req.cookies = {}, (req.headers.cookie || '').split(/\s*;\s*/).forEach(pair => { 39 | let crack = pair.indexOf('=') 40 | if(crack < 1 || crack == pair.length - 1) return 41 | req.cookies[decodeURIComponent(pair.slice(0, crack)).trim()] = decodeURIComponent(pair.slice(crack + 1)).trim() 42 | }) 43 | next() 44 | }) 45 | 46 | // body parser 47 | app.use(bodyParser.json()) 48 | app.use(bodyParser.urlencoded({extended: false})) 49 | 50 | // cache 51 | app.use(cache('2 minutes', ((req, res) => res.statusCode === 200))) 52 | 53 | // static 54 | app.use(express.static(path.join(__dirname, 'public'))) 55 | 56 | // router 57 | const special = { 58 | 'daily_signin.js': '/daily_signin', 59 | 'fm_trash.js': '/fm_trash', 60 | 'personal_fm.js': '/personal_fm' 61 | } 62 | 63 | fs.readdirSync(path.join(__dirname, 'module')).reverse().forEach(file => { 64 | if(!(/\.js$/i.test(file))) return 65 | let route = (file in special) ? special[file] : '/' + file.replace(/\.js$/i, '').replace(/_/g, '/') 66 | let question = require(path.join(__dirname, 'module', file)) 67 | 68 | app.use(route, (req, res) => { 69 | let query = Object.assign({}, req.query, req.body, {cookie: req.cookies}) 70 | question(query, request) 71 | .then(answer => { 72 | console.log('[OK]', decodeURIComponent(req.originalUrl)) 73 | res.append('Set-Cookie', answer.cookie) 74 | res.status(answer.status).send(answer.body) 75 | }) 76 | .catch(answer => { 77 | console.log('[ERR]', decodeURIComponent(req.originalUrl)) 78 | if(answer.body.code =='301') answer.body.msg = '需要登录' 79 | res.append('Set-Cookie', answer.cookie) 80 | res.status(answer.status).send(answer.body) 81 | }) 82 | }) 83 | }) 84 | 85 | const port = process.env.PORT || 3000 86 | 87 | app.server = app.listen(port, () => { 88 | console.log(`server running @ http://localhost:${port}`) 89 | }) 90 | 91 | module.exports = app 92 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/docs/sw.js: -------------------------------------------------------------------------------- 1 | /* =========================================================== 2 | * docsify sw.js 3 | * =========================================================== 4 | * Copyright 2016 @huxpro 5 | * Licensed under Apache 2.0 6 | * Register service worker. 7 | * ========================================================== */ 8 | 9 | const RUNTIME = 'docsify' 10 | const HOSTNAME_WHITELIST = [ 11 | self.location.hostname, 12 | 'fonts.gstatic.com', 13 | 'fonts.googleapis.com', 14 | 'unpkg.com' 15 | ] 16 | 17 | // The Util Function to hack URLs of intercepted requests 18 | const getFixedUrl = (req) => { 19 | var now = Date.now() 20 | var url = new URL(req.url) 21 | 22 | // 1. fixed http URL 23 | // Just keep syncing with location.protocol 24 | // fetch(httpURL) belongs to active mixed content. 25 | // And fetch(httpRequest) is not supported yet. 26 | url.protocol = self.location.protocol 27 | 28 | // 2. add query for caching-busting. 29 | // Github Pages served with Cache-Control: max-age=600 30 | // max-age on mutable content is error-prone, with SW life of bugs can even extend. 31 | // Until cache mode of Fetch API landed, we have to workaround cache-busting with query string. 32 | // Cache-Control-Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=453190 33 | if (url.hostname === self.location.hostname) { 34 | url.search += (url.search ? '&' : '?') + 'cache-bust=' + now 35 | } 36 | return url.href 37 | } 38 | 39 | /** 40 | * @Lifecycle Activate 41 | * New one activated when old isnt being used. 42 | * 43 | * waitUntil(): activating ====> activated 44 | */ 45 | self.addEventListener('activate', event => { 46 | event.waitUntil(self.clients.claim()) 47 | }) 48 | 49 | /** 50 | * @Functional Fetch 51 | * All network requests are being intercepted here. 52 | * 53 | * void respondWith(Promise r) 54 | */ 55 | self.addEventListener('fetch', event => { 56 | // Skip some of cross-origin requests, like those for Google Analytics. 57 | if (HOSTNAME_WHITELIST.indexOf(new URL(event.request.url).hostname) > -1) { 58 | // Stale-while-revalidate 59 | // similar to HTTP's stale-while-revalidate: https://www.mnot.net/blog/2007/12/12/stale 60 | // Upgrade from Jake's to Surma's: https://gist.github.com/surma/eb441223daaedf880801ad80006389f1 61 | const cached = caches.match(event.request) 62 | const fixedUrl = getFixedUrl(event.request) 63 | const fetched = fetch(fixedUrl, { cache: 'no-store' }) 64 | const fetchedCopy = fetched.then(resp => resp.clone()) 65 | 66 | // Call respondWith() with whatever we get first. 67 | // If the fetch fails (e.g disconnected), wait for the cache. 68 | // If there’s nothing in cache, wait for the fetch. 69 | // If neither yields a response, return offline pages. 70 | event.respondWith( 71 | Promise.race([fetched.catch(_ => cached), cached]) 72 | .then(resp => resp || fetched) 73 | .catch(_ => { /* eat any errors */ }) 74 | ) 75 | 76 | // Update the cache with the version we fetched (only for ok status) 77 | event.waitUntil( 78 | Promise.all([fetchedCopy, caches.open(RUNTIME)]) 79 | .then(([response, cache]) => response.ok && cache.put(event.request, response)) 80 | .catch(_ => { /* eat any errors */ }) 81 | ) 82 | } 83 | }) 84 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/README.MD: -------------------------------------------------------------------------------- 1 | # 网易云音乐 API 2 | 3 | 网易云音乐 Node.js API service 4 | 5 |

6 | Version 7 | License 8 | devDependencies 9 | devDependencies 10 | 11 |

12 | 13 | ## 灵感来自 14 | 15 | [disoul/electron-cloud-music](https://github.com/disoul/electron-cloud-music) 16 | 17 | [darknessomi/musicbox](https://github.com/darknessomi/musicbox) 18 | 19 | [sqaiyan/netmusic-node](https://github.com/sqaiyan/netmusic-node) 20 | 21 | ## 功能特性 22 | 23 | 1. 登录 24 | 2. 刷新登录 25 | 3. 获取用户信息 , 歌单,收藏,mv, dj 数量 26 | 4. 获取用户歌单 27 | 5. 获取用户电台 28 | 6. 获取用户关注列表 29 | 7. 获取用户粉丝列表 30 | 8. 获取用户动态 31 | 9. 获取用户播放记录 32 | 10. 获取精品歌单 33 | 11. 获取歌单详情 34 | 12. 搜索 35 | 13. 搜索建议 36 | 14. 获取歌词 37 | 15. 歌曲评论 38 | 16. 收藏单曲到歌单 39 | 17. 专辑评论 40 | 18. 歌单评论 41 | 19. mv 评论 42 | 20. 电台节目评论 43 | 21. banner 44 | 22. 获取歌曲详情 45 | 23. 获取专辑内容 46 | 24. 获取歌手单曲 47 | 25. 获取歌手 mv 48 | 26. 获取歌手专辑 49 | 27. 获取歌手描述 50 | 28. 获取相似歌手 51 | 29. 获取相似歌单 52 | 30. 相似 mv 53 | 31. 获取相似音乐 54 | 32. 获取最近 5 个听了这首歌的用户 55 | 33. 获取每日推荐歌单 56 | 34. 获取每日推荐歌曲 57 | 35. 私人 FM 58 | 36. 签到 59 | 37. 喜欢音乐 60 | 38. 垃圾桶 61 | 39. 歌单 ( 网友精选碟 ) 62 | 40. 新碟上架 63 | 41. 热门歌手 64 | 42. 最新 mv 65 | 43. 推荐 mv 66 | 44. 推荐歌单 67 | 45. 推荐新音乐 68 | 46. 推荐电台 69 | 47. 推荐节目 70 | 48. 独家放送 71 | 49. mv 排行 72 | 50. 获取 mv 数据 73 | 51. 播放 mv/视频 74 | 52. 排行榜 75 | 53. 歌手榜 76 | 54. 云盘 77 | 55. 电台 - 推荐 78 | 56. 电台 - 分类 79 | 57. 电台 - 分类推荐 80 | 58. 电台 - 订阅 81 | 59. 电台 - 详情 82 | 60. 电台 - 节目 83 | 61. 给评论点赞 84 | 62. 获取动态 85 | 63. 获取热搜 86 | 64. 发送私信 87 | 65. 发送私信歌单 88 | 66. 新建歌单 89 | 67. 收藏/取消收藏歌单 90 | 68. 歌单分类 91 | 69. 收藏的歌手列表 92 | 70. 订阅的电台列表 93 | 71. 相关歌单推荐 94 | 72. 付费精选接口 95 | 73. 音乐是否可用检查接口 96 | 74. 登录状态 97 | 75. 获取视频数据 98 | 76. 发送/删除评论 99 | 77. 热门评论 100 | 78. 视频评论 101 | 79. 退出登录 102 | 80. 所有榜单 103 | 81. 所有榜单内容摘要 104 | 82. 收藏视频 105 | 83. 收藏 MV 106 | 84. 视频详情 107 | 85. 相关视频 108 | 86. 关注用户 109 | 87. 新歌速递 110 | 88. 喜欢音乐列表(无序) 111 | 89. 收藏的 MV 列表 112 | 90. 获取最新专辑 113 | 91. 听歌打卡 114 | 92. 获取视频标签下的视频 115 | 93. 已收藏专辑列表 116 | 117 | ## 环境要求 118 | 119 | 需要 NodeJS 8.12+ 环境 120 | 121 | ## 安装 122 | 123 | ```shell 124 | $ git clone git@github.com:Binaryify/NeteaseCloudMusicApi.git 125 | $ npm install 126 | ``` 127 | 128 | ## 运行 129 | 130 | ```shell 131 | $ node app.js 132 | ``` 133 | 134 | 服务器启动默认端口为 3000,若不想使用 3000 端口,可使用以下命令: Mac/Linux 135 | 136 | ```shell 137 | $ PORT=4000 node app.js 138 | ``` 139 | 140 | windows 下使用 git-bash 或者 cmder 等终端执行以下命令: 141 | 142 | ```shell 143 | $ set PORT=4000 && node app.js 144 | ``` 145 | 146 | ## 使用文档 147 | 148 | [文档地址](https://binaryify.github.io/NeteaseCloudMusicApi) 149 | 150 | ![文档](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/docs.png) 151 | 152 | ## 更新日志 153 | 154 | [changelog](https://github.com/Binaryify/NeteaseCloudMusicApi/blob/master/CHANGELOG.MD) 155 | 156 | ## 单元测试 157 | 158 | ```shell 159 | $ npm test 160 | ``` 161 | 162 | ![单元测试](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/screenshot1.png) 163 | ![单元测试](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/screenshot2.png) 164 | 165 | ## 贡献者 166 | ![](https://opencollective.com/NeteaseCloudMusicApi/contributors.svg?width=890) 167 | 168 | 169 | ## License 170 | 171 | [The MIT License (MIT)](https://github.com/Binaryify/NeteaseCloudMusicApi/blob/master/LICENSE) 172 | -------------------------------------------------------------------------------- /src/components/singer/singer.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 102 | 103 | 118 | -------------------------------------------------------------------------------- /src/components/songs/songs.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 106 | 107 | 125 | 126 | -------------------------------------------------------------------------------- /src/base/playList.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 75 | 76 | 133 | -------------------------------------------------------------------------------- /src/components/recommend/recommend.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 132 | 133 | 148 | -------------------------------------------------------------------------------- /src/base/songList.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 72 | 73 | 145 | 146 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/util/request.js: -------------------------------------------------------------------------------- 1 | const encrypt = require('./crypto') 2 | const request = require('request') 3 | const queryString = require('querystring') 4 | const PacProxyAgent = require('pac-proxy-agent') 5 | 6 | // request.debug = true // 开启可看到更详细信息 7 | 8 | const chooseUserAgent = ua => { 9 | const userAgentList = [ 10 | 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1', 11 | 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1', 12 | 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Mobile Safari/537.36', 13 | 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Mobile Safari/537.36', 14 | 'Mozilla/5.0 (Linux; Android 5.1.1; Nexus 6 Build/LYZ28E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Mobile Safari/537.36', 15 | 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_2 like Mac OS X) AppleWebKit/603.2.4 (KHTML, like Gecko) Mobile/14F89;GameHelper', 16 | 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_0 like Mac OS X) AppleWebKit/602.1.38 (KHTML, like Gecko) Version/10.0 Mobile/14A300 Safari/602.1', 17 | 'Mozilla/5.0 (iPad; CPU OS 10_0 like Mac OS X) AppleWebKit/602.1.38 (KHTML, like Gecko) Version/10.0 Mobile/14A300 Safari/602.1', 18 | 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:46.0) Gecko/20100101 Firefox/46.0', 19 | 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', 20 | 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4', 21 | 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0', 22 | 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36', 23 | 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/13.10586' 24 | ] 25 | let index = 0 26 | if (typeof ua == 'undefined') 27 | index = Math.floor(Math.random() * userAgentList.length) 28 | else if (ua == 'mobile') index = Math.floor(Math.random() * 7) 29 | else if (ua == 'pc') index = Math.floor(Math.random() * 5) + 8 30 | else return ua 31 | return userAgentList[index] 32 | } 33 | 34 | const createRequest = (method, url, data, options) => { 35 | return new Promise((resolve, reject) => { 36 | let headers = { 'User-Agent': chooseUserAgent(options.ua) } 37 | if (method.toUpperCase() == 'POST') 38 | headers['Content-Type'] = 'application/x-www-form-urlencoded' 39 | if (url.includes('music.163.com')) 40 | headers['Referer'] = 'https://music.163.com' 41 | // headers['X-Real-IP'] = '118.88.88.88' 42 | 43 | if (typeof options.cookie === 'object') 44 | headers['Cookie'] = Object.keys(options.cookie) 45 | .map( 46 | key => 47 | encodeURIComponent(key) + 48 | '=' + 49 | encodeURIComponent(options.cookie[key]) 50 | ) 51 | .join('; ') 52 | else if (options.cookie) headers['Cookie'] = options.cookie 53 | 54 | if (options.crypto == 'weapi') { 55 | let csrfToken = (headers['Cookie'] || '').match(/_csrf=([^(;|$)]+)/) 56 | data.csrf_token = csrfToken ? csrfToken[1] : '' 57 | data = encrypt.weapi(data) 58 | url = url.replace(/\w*api/, 'weapi') 59 | } else if (options.crypto == 'linuxapi') { 60 | data = encrypt.linuxapi({ 61 | method: method, 62 | url: url.replace(/\w*api/, 'api'), 63 | params: data 64 | }) 65 | headers['User-Agent'] = 66 | 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36' 67 | url = 'https://music.163.com/api/linux/forward' 68 | } 69 | 70 | const answer = { status: 500, body: {}, cookie: [] } 71 | const settings = { 72 | method: method, 73 | url: url, 74 | headers: headers, 75 | body: queryString.stringify(data) 76 | } 77 | 78 | if (/\.pac$/i.test(options.proxy)) { 79 | settings.agent = new PacProxyAgent(options.proxy) 80 | } else { 81 | settings.proxy = options.proxy 82 | } 83 | 84 | request( 85 | settings, 86 | (err, res, body) => { 87 | if (err) { 88 | answer.status = 502 89 | answer.body = { code: 502, msg: err.stack } 90 | reject(answer) 91 | } else { 92 | answer.cookie = (res.headers['set-cookie'] || []).map(x => 93 | x.replace(/\s*Domain=[^(;|$)]+;*/, '') 94 | ) 95 | try { 96 | answer.body = JSON.parse(body) 97 | answer.status = answer.body.code || res.statusCode 98 | } catch (e) { 99 | answer.body = body 100 | answer.status = res.statusCode 101 | } 102 | answer.status = 103 | 100 < answer.status && answer.status < 600 ? answer.status : 400 104 | if (answer.status == 200) resolve(answer) 105 | else reject(answer) 106 | } 107 | } 108 | ) 109 | }) 110 | } 111 | 112 | module.exports = createRequest 113 | -------------------------------------------------------------------------------- /src/base/MusicList.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 66 | 67 | 141 | -------------------------------------------------------------------------------- /src/base/progressBar.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 110 | 111 | 112 | 162 | -------------------------------------------------------------------------------- /src/base/category.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 114 | 115 | -------------------------------------------------------------------------------- /src/base/slider.vue: -------------------------------------------------------------------------------- 1 | 17 | 131 | 132 | 197 | -------------------------------------------------------------------------------- /NeteaseCloudMusicApi/CHANGELOG.MD: -------------------------------------------------------------------------------- 1 | # 更新日志 2 | ### 3.4.0 | 2019.01.29 3 | - 增加已收藏专辑列表接口 4 | 5 | ### 3.3.0 | 2019.01.27 6 | - 增加视频标签下的视频获取接口 7 | 8 | - 增加 pac 代理支持 9 | 10 | ### 3.2.0 | 2019.01.19 11 | - 增加获取首页新碟上架数据以及更新听歌排行 12 | 13 | - 更新搜索建议接口 14 | 15 | ### 3.1.0 | 2019.01.06 16 | - 修复评论接口返回 460 Cheating 的问题 17 | 18 | - 新增`已收藏MV`接口,更新文档 19 | 20 | ### 3.0.9 | 2018.12.15 21 | - 修复关注异常的问题 #399 22 | 23 | ### 3.0.8 | 2018.12.12 24 | - 更新文档 #386 #394 25 | 26 | - 优化电台节目接口 27 | 28 | ### 3.0.7 | 2018.11.21 29 | - 修复歌单详情列表,排行榜,所有榜单失效的问题,更新文档 #380 #381 30 | 31 | ### 3.0.4 | 2018.11.15 32 | - 修复 `/song/url` 接口无法返回多个音乐数据的问题 33 | 34 | ### 3.0.3 | 2018.11.09 35 | - 修复取消喜欢歌曲失败问题 [#360](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/360) 36 | 37 | - 补充已喜欢音乐列表接口说明文档 [#370](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/370) 38 | 39 | - 默认关闭 debug 模式 [#365](https://github.com/Binaryify/NeteaseCloudMusicApi/pull/365) 40 | 41 | - 更新 Dockerfile 文件 [#367](https://github.com/Binaryify/NeteaseCloudMusicApi/pull/367) 42 | 43 | 44 | ### 3.0.1 | 2018.10.21 45 | 46 | - 合并 PR([#351](https://github.com/Binaryify/NeteaseCloudMusicApi/pull/351)) 47 | 48 | - 文档增加 `/top/song` 接口 49 | 50 | - `/banner` 换成 linux api,返回结构有所变动 51 | 52 | - `/check/music` 已知 bug 修复 53 | 54 | ### 3.0.0 | 2018.10.14 55 | 56 | #### 整体 57 | 58 | - 完善文档,增加之前没写进文档的接口说明 59 | 60 | - 重写 createRequest 返回 Promise 对象 61 | 62 | - 模块化路由 63 | 64 | - 模块化, 剥离 res,req, 方便导出调用 65 | 66 | - 增加 cookie-parser 67 | 68 | ##### 参数修改 69 | 70 | - `/song/detail` 增加多 id 支持 71 | 72 | - `/toplist/detail` 移除参数 73 | 74 | - `/resource/like` 增加参数 `type` 75 | 76 | - `/top/playlist/highquality` 增加分页参数 `before` 77 | 78 | ##### 统一参数 79 | 80 | - `/artist/sub` 与 `artist/unsub` 合并, 用`query.t` 81 | 82 | - `/follow` 中 `query.type` 换成 `query.t` 83 | 84 | - `/comment` 中 `query.action` 换成 `query.t` 85 | 86 | ##### URL 重命名 87 | 88 | - `/video` 改为 `video/url` 89 | 90 | - `/mv` 改为 `mv/detail` 91 | 92 | - `/music/url` 改为 `/song/url` 93 | 94 | ##### 转发逻辑修改 95 | 96 | - `/toplist/artist` 换成 weapi 97 | 98 | - `/mv/url` 去除了 pipe 99 | 100 | ##### BUG 修复 101 | 102 | - `/playlist/create`, `/playlist/update` 被判欺骗,增加 cookie 103 | 104 | ##### 路由增删 105 | 106 | - 删除 `/recommend/dislike` 107 | 108 | - 增加 `/video/sub` (收藏视频), `/mv/sub` (收藏 MV) 109 | 110 | - 增加 `/video/detail` (视频详情) 111 | 112 | - 增加 `/related/allvideo` (相关视频) 113 | 114 | ### 2.20.5 | 2018.09.29 115 | 116 | 修复非法参数 403 #335, 修复代理错误 #334 117 | 118 | ### 2.20.4 | 2018.09.27 119 | 120 | 修复点赞失效的问题 121 | 122 | ### 2.20.3 | 2018.09.26 123 | 124 | - 增加退出登陆接口 125 | - 修正 /check/music 的检查逻辑 126 | - 优化 Cookies 设置 127 | - 重构单元测试 128 | 129 | [by @nondanee](https://github.com/nondanee) 130 | 131 | - 增加 301 需要登陆提示信息 132 | 133 | - 更新文档 134 | 135 | ### 2.20.2 | 2018.09.22 136 | 137 | 增加热门评论和视频评论接口,更新文档 138 | 139 | ### 2.20.1 | 2018.09.17 140 | 141 | 优化版本检查功能 142 | 143 | ### 2.20.0 | 2018.09.06 144 | 145 | 新增版本检查功能 146 | 147 | ### 2.19.0 | 2018.08.29 148 | 149 | 新增获取视频数据接口,新增发送/删除评论接口,修复登录状态接口问题,完善文档 #301,感谢 @izhenyuls 150 | 151 | ### 2.17.0 | 2018.08.28 152 | 153 | 新增登录状态查询接口 #302 ,完善文档,完善路由注册 #297 154 | 155 | ### 2.16.0 | 2018.08.09 156 | 157 | - Fixed #288,#289,#290 158 | 159 | 解决歌曲 URL 请求被判 Cheating,修复私信接收异常 #291 160 | 161 | ### 2.15.0 | 2018.07.30 162 | 163 | 新增相关歌单推荐和付费精选接口,增加歌手列表接口按首字母索引查找参数 164 | 165 | ### 2.14.0 | 2018.07.03 166 | 167 | 修复无法使用邮箱问题 168 | 169 | ### 2.13.0 | 2018.06.05 170 | 171 | 增加自动注册路由的功能,简化路由注册逻辑 172 | 173 | ### 2.12.0 | 2018.05.27 174 | 175 | 更新文档,优化歌单详情接口 176 | 177 | ### 2.11.1 | 2018.05.24 178 | 179 | 更新文档,优化`/dj/program`接口 180 | 181 | ### 2.11.0 | 2018.05.21 182 | 183 | 增加收藏歌手列表&订阅电台列表 184 | 185 | ### 2.10.0 | 2018.05.17 186 | 187 | 歌单操作调整为批量操作 188 | 189 | ### 2.9.9 | 2018.05.16 190 | 191 | Bug 修复 192 | 193 | ### 2.9.8 | 2018.05.10 194 | 195 | 新增歌手分类列表,收藏/取消收藏歌手接口,新增更新用户信息,更新歌单接口 196 | 197 | ### 2.9.6 | 2018.05.08 198 | 199 | 新增发送私信相关接口,新增新建歌单,收藏/取消收藏歌单接口 200 | 201 | ### 2.9.4 | 2018.05.04 202 | 203 | 新增热搜接口,更新 banner 接口 204 | 205 | ### 2.9.2 | 2018.02.28 206 | 207 | 修复登录失败会崩溃的问题 208 | 209 | ### 2.9.1 | 2018.01.26 210 | 211 | docker 构建文件的一些增强以及增加访问日志和调试输出 212 | 213 | ### 2.8.9 | 2018.01.24 214 | 215 | 修复歌单详情数据不完整的问题,更新依赖 216 | 217 | ### 2.8.8 | 2018.01.22 218 | 219 | 修复排行榜数据不完整的问题 , 优化部分代码 , 更新文档部分描述 220 | 221 | ### 2.8.6 | 2018.01.16 222 | 223 | 修复歌单详情接口数据不完整的问题 224 | 225 | ### 2.8.5 | 2018.01.16 226 | 227 | 修复评论点赞失败的问题 228 | 229 | ### 2.8.4 | 2018.01.15 230 | 231 | 优化 cookie 设置 232 | 233 | ### 2.8.3 | 2018.01.12 234 | 235 | 优化部分功能和文档 236 | 237 | ### 2.8.2 | 2018.01.05 238 | 239 | 增加 Dockerfile,支持以 Docker 容器模式运行 240 | 241 | ### 2.8.1 | 2018.01.04 242 | 243 | 添加了 proxy 功能 244 | 245 | ### 2.8.0 | 2018.01.04 246 | 247 | 用 'request' 重写了请求函数 248 | 249 | ### 2.7.9 | 2017.12.11 250 | 251 | 更新排行榜接口 , 新增云音乐 ACG 音乐榜 , 云音乐嘻哈榜 252 | 253 | ### 2.7.7 | 2017.11.27 254 | 255 | 更新 / 修复排行榜接口 , 更新 / 修复推荐歌单接口 256 | 257 | ### 2.7.7 | 2017.11.27 258 | 259 | 更新 / 修复排行榜接口 , 更新 / 修复推荐歌单接口 260 | 261 | ### 2.7.2 | 2017.9.7 262 | 263 | 修复搜索接口 offset 参数失效问题 264 | 265 | ### 2.7.0 | 2017.8.21 266 | 267 | 优化刷新登录代码 268 | 269 | ### 2.6.5 | 2017.7.16 270 | 271 | 优化 CORS 设置 272 | 273 | ### 2.6.4 | 2017.7.16 274 | 275 | 添加缓存机制和随机 UA 机制 感谢[@u3u](https://github.com/u3u) 276 | [issue:77](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/77) 优化请求 277 | 代码 感谢 [@huhuime](https://github.com/huhuime) 278 | [issue:83](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/83) 279 | 280 | ### 2.6.2 | 2017.7.16 281 | 282 | 修复垃圾桶接口 283 | 284 | ### 2.6.1 | 2017.7.16 285 | 286 | 修复红心接口 287 | 288 | ### 2.6.0 | 2017.6.25 289 | 290 | 修复签到接口 291 | 292 | ### 2.5.9 | 2017.6.14 293 | 294 | 增加启动说明页 295 | 296 | ### 2.5.8 | 2017.6.1 297 | 298 | 修复若干细节问题 299 | 300 | ### 2.5.7 | 2017.5.22 301 | 302 | 修复若干问题 303 | 304 | ### 2.5.6 | 2017.5.14 305 | 306 | 增加动态消息接口 307 | 308 | ### 2.5.5 | 2017.5.10 309 | 310 | 修复 mv 排行榜接口崩溃问题 311 | 312 | ### 2.5.4 | 2017.5.5 313 | 314 | 新增点赞接口 , 更新文档 315 | 316 | ### 2.5.3 | 2017.5.2 317 | 318 | 修复歌手单曲数据空白问题和文档获取歌手单曲 url 描述问题 , 更新文档 319 | 320 | ### 2.5.0 | 2017.4.29 321 | 322 | 增加 mv/ 专辑 / 歌单评论接口 , 增加云盘相关接口 , 增加获取用户动态 / 信息接口 , 323 | 增加关注 / 粉丝列表接口 , 增加收藏歌单接口 , 增加相似 mv/ 歌曲 / 用户接口 , 增加 324 | banner 接口 , 增加刷新登录接口 , 增加电台相关接口 , 补充评论接口 , 更新文档 325 | 326 | ### 2.4.6 | 2017.4.21 327 | 328 | 增加播放 mv 接口 , 更新文档 329 | 330 | ### 2.4.5 | 2017.4.20 331 | 332 | 增加歌手专辑 , 歌手单曲等接口 , 修复 /album 接口描述错误 , 更新文档 333 | 334 | ### 2.4.0 | 2017.4.20 335 | 336 | 增加歌单(网友精选碟 ), 新碟上架 , 热门歌手等接口 , 更新文档 337 | 338 | ### 2.3.4 | 2017.4.20 339 | 340 | 增加歌曲详情接口 , 更新文档 341 | 342 | ### 2.3.0 | 2017.4.15 343 | 344 | 增加排行榜接口 , 更新文档 345 | 346 | ### 2.2.0 |2017.4.14 347 | 348 | 增加私人 FM, 喜欢歌曲 , 垃圾桶 , 每日签到等接口 , 更新文档 349 | 350 | ### 2.1.3 | 2017.4.6 351 | 352 | 改善文档 353 | 354 | ### 2.1.0 | 2017.4.6 355 | 356 | 增加获取评论接口以及对应单元测试 , 增加更新日志 357 | 358 | ### 2.0.0 | 2017.4.1 359 | 360 | 版本升级到 2.0. 增加使用文档 , 完成项目重构 , 增加更完善的单元测试 , 升级 api 到 361 | v2+, 支持登录并获取用户信息和创建的歌单 , 可通过获取音乐 url 接口获取用户歌单里 362 | 的的音乐 , 获取每日推荐歌单和每日推荐音乐 363 | -------------------------------------------------------------------------------- /src/components/rank/rank.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | 103 | 104 | 178 | -------------------------------------------------------------------------------- /src/components/songListPage/songListPage.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 34 | 150 | 151 | 152 | 283 | --------------------------------------------------------------------------------