All Projects → ShanaMaid → Vue 163 Music

ShanaMaid / Vue 163 Music

Licence: mit
【停止维护】网易云音乐web版,支持PC端常用功能,localStorage保存播放列表

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vue 163 Music

Vue2 Shop
A shop developed with Vue2 + Vue-router + Axios + Vuex + Node + Express + MongoDB + Webpack
Stars: ✭ 103 (-86.93%)
Mutual labels:  express, vuex, website, vue-router
Vue Website
🍰 想用vue把我现在的个人网站重新写一下,新的风格,新的技术,什么都是新的!
Stars: ✭ 351 (-55.46%)
Mutual labels:  vue-demo, vuex, website, vue-router
Yesplaymusic
高颜值的第三方网易云播放器,支持 Windows / macOS / Linux
Stars: ✭ 12,981 (+1547.34%)
Mutual labels:  music, player, vuex, vue-router
Easy Vue
Learn vueJS Easily 👻
Stars: ✭ 896 (+13.71%)
Mutual labels:  vue-demo, vuex, vue-resource
Vue Shoppingcart
ShoppingCart (Ecommerce) 🛒 Application using Vuejs, + Node.js + Express + MongoDB 🚀🤘
Stars: ✭ 141 (-82.11%)
Mutual labels:  express, vuex, vue-router
Mmf Blog Vue2 Ssr
mmf-blog-vue2 ssr(The service side rendering)
Stars: ✭ 174 (-77.92%)
Mutual labels:  express, vuex, vue-router
Vue2 Basic Demo
这里是关于学习vue2.0的相关例子和项目,欢迎一起学习!
Stars: ✭ 125 (-84.14%)
Mutual labels:  vue-demo, vuex, vue-router
Vue Cnode
基于vue2 + vue-router + vuet + ES6 + less + flex.css重写vue版cnode社区,使用webpack2打包
Stars: ✭ 1,134 (+43.91%)
Mutual labels:  vue-demo, vuex, vue-router
Vue2 Demo
Vue 基于 Genesis + TS + Vuex 实现的 SSR demo
Stars: ✭ 2,072 (+162.94%)
Mutual labels:  vue-demo, vuex, vue-router
Douban
Awesome douban DEMO created with Vue2.x + Vuex + Vue-router + Superagent
Stars: ✭ 2,324 (+194.92%)
Mutual labels:  vue-demo, vuex, vue-router
Myblog
vue + node 实现的一个博客系统
Stars: ✭ 285 (-63.83%)
Mutual labels:  express, vue-router, vue-resource
Vue Mintshop
🍖 🍉 使用 ES6 + Mock.js + vue2.0 全家桶开发的前后端分离的外卖App。开发文档、流程完整详尽,非常适合作为个人练手项目。
Stars: ✭ 552 (-29.95%)
Mutual labels:  vue-demo, vuex, vue-router
163music
🎵163 music web app built with Vue 2.6, server side render, webpack 4
Stars: ✭ 139 (-82.36%)
Mutual labels:  express, vuex, vue-router
Vuesocial
something like QQ、weibo、weChat(vue+express+socket.io仿微博、微信的聊天社交平台)
Stars: ✭ 189 (-76.02%)
Mutual labels:  express, vuex, vue-router
Questionnaire
📋 问卷系统
Stars: ✭ 128 (-83.76%)
Mutual labels:  express, vuex, vue-router
Vue Spa Project
vue.js + vuex + vue-router + fetch + element-ui + es6 + webpack + mock 纯前端SPA项目开发实践
Stars: ✭ 118 (-85.03%)
Mutual labels:  vue-demo, vuex, vue-router
Music Player
Vue高仿网易云音乐(Vue入门实践)——在线预览 -- 暂时停止
Stars: ✭ 428 (-45.69%)
Mutual labels:  music, vuex, vue-router
Vue Chatroom
Vue全家桶 + socket.io + express 搭建的聊天室+ 智能问答助手
Stars: ✭ 27 (-96.57%)
Mutual labels:  express, vuex, vue-router
Vue Studymaps
使用 Vue.js 开发的聚合应用。通过爬虫抓取平时浏览的网站,省去逐个点开网页的时间。
Stars: ✭ 71 (-90.99%)
Mutual labels:  express, vuex, vue-router
Vue Cnode
一个vuex vue-router vue-resource的单页面应用demo,api来自cnodejs. vue 1
Stars: ✭ 174 (-77.92%)
Mutual labels:  vue-demo, vuex, vue-router

vue-163-music(网易云音乐web版)

用vue仿写163音乐客户端版。

原计划仿写完所有页面,碍于网易的接口API有限,实现页面也有限。

不推荐手机端访问。

页面高度为670px1366 X 768分辨率及其以下按F11全屏浏览效果更佳

欢迎issueprstar or follow!我将继续开源更多有趣的项目

推荐一个React全家桶写的 追书神器

在线版

点击进入

部分效果截图

3

更多效果gif图

工具&技能

vue + vuex+ vue-router + vue-resource

express

http-proxy-middleware 一个http代理的中间件,进行http请求转发,实现跨域请求

store.js 一个非常棒的处理localStorage的轮子,原生localStorage只支持存储字符串类型,轮子进行封装后可以直接存储ArrayObjectfunctionSet等类型

animate.css css动画库

vue-slider-component 滑块组件

postman 接口测试工具

使用

git clone https://github.com/ShanaMaid/vue-163-music.git

cd vue-163-music

npm install 

# 启动api转发
node server/newapi.js


# 开发环境
npm run dev
访问 http://localhost:8080/

# 打包
npm run build

# 实际环境
cd server
node app.js
访问 http://localhost:3000/

实现功能

发现音乐

  • [x] 个性推荐(推荐歌单中除每日歌曲推荐外,其余歌单可点击进入)

播放音乐

  • [x] 上一曲
  • [x] 播放
  • [x] 暂停
  • [x] 下一曲
  • [x] 进度控制
  • [x] 音量控制

音乐搜索

输入搜索关键词,回车键搜索,或者点击放大镜图标

  • [x] 单曲(单击或双击歌曲添加至音乐播放列表,部分音乐会存在版权问题无法播放)
  • [x] 歌手
  • [x] 专辑
  • [x] MV
  • [x] 歌单(左键点击进入歌单列表)
  • [x] 主播电台 (单期节目部分单击或双击歌曲添加至音乐播放列表,目前不存在版权问题)
  • [x] 用户

歌单

  • [x] 播放全部

播放列表

  • [x] 切歌(单击切歌)
  • [x] 删歌(鼠标悬浮在要删除的歌曲上,点击右侧小X)
  • [x] 清空播放列表
  • [x] 本地缓存播放列表

一些问题

通过api接口获取的mv播放量基本不准,尚未找到原因,其余类型的播放量准确

目录结构

|
|—— build 
|—— config
|—— server 服务端
| |—— app.js 服务端启动入口文件
| |—— static 打包后的资源文件
| |__ index.html 网页入口
|
|——src 资源文件
| |—— assets 组件静态资源库
| |—— components 组件库
| |—— deal  163api返回的JSON字符串解构
| |—— filters 自定义过滤器
| |—— router 路由配置
| |—— store vuex状态管理
| |—— App.vue 163SPA
| |__ main.js SPA入口
|
|__ static 静态资源目录

一些注意事项

项目中使用了网易爸爸的接口,需要使用http-proxy-middleware进行转发,开发环境下需要在config/index.js中的dev中添加下列配置即可

proxyTable: {
  '/api': {
      target: 'http://music.163.com',
      changeOrigin: true,
      headers: {
          Referer: 'http://music.163.com/'
      }
  }
}

实际环境中,服务器端配置

var express = require('express');
var proxy = require('http-proxy-middleware');

var app = express();
app.use('/static', express.static('static'));
app.use('/api', proxy({
  target: 'http://music.163.com', 
  changeOrigin: true, 
  headers: {
    Referer: 'http://music.163.com/'
  }
}
));

app.get('/', function (req, res) {
  res.sendFile(__dirname + '/index.html');
});
app.listen(3000);

对返回的数据解构js文件位于src/components/deal/目录下,比如对单曲搜索结果进行解构

single: (data) => {
  let list = []
  let count = data.result.songCount
  if (count === 0) {
    return {list, count}
  }
  for (let item of data.result.songs) {
    let singer = ''
    let {
      name,
      mp3Url,
      duration,
      id,
      album: {
        name: albumName
      }
    } = item
    for (let item of item.artists) {
      singer += item.name + ' '
    }
    list.push({name, mp3Url, duration, id, albumName, singer})
  }
  return {list, count}
}

vuex状态管理位于src/components/store目录下

vue-router路由配置管理位于src/components/router目录下

自定义过滤器位于src/components/filters/目录下

网易云音乐接口来源于http://moonlib.com/606.html

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].