功能最多,按照ios客户端高仿,还有小程序版嘞
网易忠粉,去年小程序刚出来时候开始用小程序写过一版高仿ios版网易云音乐。一直在踩坑,基本完成后开始考虑用vue实现(其实是懒,想脱坑)。vue之前仅限于活动页使用,全家桶没用过,所以这次也是边学边做,很多东西来回重写了好多次。
遇到的问题
- 第一次用全家桶,不过vuex确实是神器,写过小程序,数据同步状态管理简直了。。。
- 数据接口格式不同,fm,单曲,节目三种格式,用一个audio。写的头大
技术栈
- Vue全家桶(vue,vue-router,vuex)
- axios(http)
- mint-ui+移植原来小程序版的css
- node(接口服务),地址在这里
- 图片资源来自ios端解压缩文件
项目地址, 欢迎 star,issue
vps ip已经被封无法在线预览了
- Vue版 :https://github.com/sqaiyan/neteasemusic
- 小程序版 :https://github.com/sqaiyan/netmusic-app
- node后端 :https://github.com/sqaiyan/netmusic-node
部署
后端项目
# 克隆node后端代码到本地
git clone git@github.com:sqaiyan/netmusic-node.git
cd netmusic-node
# install dependencies
npm install
# serve at localhost:3000
node app.js
前台项目
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
预览图gif版比较大、

2

2

2

2

2

2

2

2

2

2

2

2

2

2

2
已完成功能
- 首页(个性推荐,分类歌单,电台推荐,热门排行
- 搜索(hot ,history ,suggest ,multimatch; 单曲,歌单,歌手,mv等。。。
- 详情单页类(歌单,歌手,电台,专辑,评论,用户,相似推荐,每日推荐
- 播放页(单曲,FM,节目:上下一曲,播放模式[单曲,随机,顺序],单曲喜欢,单曲收藏到歌单,fm trash,快进快退,歌词,播放列表
- 我的(登录,云盘,收藏
待完成功能(根据api破解情况
- 评论(操作类
- 动态
- 音质切换
- 歌词翻译
....
存在的问题或bug
单曲播放进入评论等前进页面,单曲播放完自动播放下一曲后页面回退回播放页面 路由自动切换不了,会播放上一曲,逻辑这块没理顺
目前的api基本都是根据官网版扒下来的,git上发布的一些也基本都是这样,客户端接口用的是最新版的 没有能力扒出来。存在问题是banner接口请求到的是老接口数据,已经不维护了的数据
mint-ui库就用到几个功能,准备单独扣出来或自己写,去掉对这个库的引用。
手机真机性能不咋地吧,可能功能多js太大了,有的页面逻辑不好影响的吧。整体keepalive了,这。。。有时间研究下怎么搞