# music **Repository Path**: alanyf/music ## Basic Information - **Project Name**: music - **Description**: No description available - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-04-07 - **Last Updated**: 2023-08-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # music > A Vue.js project ## 说明 ### 一、本地启动网易云音乐的接口服务 接口文档:https://binaryify.github.io/NeteaseCloudMusicApi/#/?id=neteasecloudmusicapi ``` bash git clone https://github.com/Binaryify/NeteaseCloudMusicApi cd NeteaseCloudMusicApi npm install node app.js ``` ### 二、启动项目 ``` bash git clone https://github.com/** cd ** # install dependencies npm install # serve with hot reload at localhost:8081 npm run dev # build for production with minification npm run build # publish git checkout dev npm run publish ``` ## 三、演示地址 点击打开下方链接,手机端直接打开链接即可,pc端按**F12**进入开发者模式,调整为手机模式查看。 [演示链接](https://alanyf.gitee.io/music) ## 四、技术栈 * **Vue** * **vue-router** * **vuex** * **webpack** * **vant** (vue移动端ui框架) ## 五、功能介绍 1. 前端页面中可通过`window.CURRENT_ENV`可以获取当前环境是开发环境还是生产环境(`build/htmlPlugin.js`); 2. 使用哈希路由模式不受后台路由限制,可以在生产环境打包后直接打开`index.html`运行或者发布到`gitHub.io`在线上运行; 3. 在不能启动webpack服务器的情况下,使用webpack动态加载js,来实现前端读取mock数据(`src/utils/ajax-mock.js`);在上方演示页面的github.io上就是使用了前端mock数据; 4. 一个命令`npm run publish`自动编译和部署, ### 发布到`gitHub.io`的方法 1. 本地在dev/mock目录下创建好需要用到的接口数据,mock数据存放目录结构和接口的path一致; 2. 生产环境打包:npm run build 3. 创建github项目,复制dist目录下的所有文件到github项目中,注意保证index.html在根目录下; 4. 发布到github page 教程: * [github.io](https://gitbook.tw/chapters/github/using-github-pages.html) * [gitee.io](https://gitee.com/help/articles/4136#article-header3) gitee是国内版的github,访问网速较快,因此我们使用的也是gitee page ## 六、页面介绍 1. 发现页面 2. 我的页面 3. 好友页面 4. 视频页面 5. 账户中心页 6. 歌曲列表页 7. 歌曲播放页 8. 歌单广场页 9. 歌单详情页 10. 搜索页 11. 底部当前播放列表页 ### 页面截图