{"id":15043429,"url":"https://github.com/neroneroffy/react-music-webapp","last_synced_at":"2025-04-05T07:04:52.524Z","repository":{"id":28147354,"uuid":"116468791","full_name":"neroneroffy/react-music-webapp","owner":"neroneroffy","description":"一款基于React构建的音乐播放器  A music webapp build with react and antd-mobile","archived":false,"fork":false,"pushed_at":"2022-12-07T17:20:35.000Z","size":40351,"stargazers_count":476,"open_issues_count":40,"forks_count":110,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-29T06:05:04.300Z","etag":null,"topics":["ant-design","antd-mobile","mongodb","nodejs","react-router","reactjs","redux"],"latest_commit_sha":null,"homepage":"http://akongkong.cn/music/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neroneroffy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-06T08:59:40.000Z","updated_at":"2024-11-13T18:40:49.000Z","dependencies_parsed_at":"2023-01-14T08:45:11.218Z","dependency_job_id":null,"html_url":"https://github.com/neroneroffy/react-music-webapp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neroneroffy%2Freact-music-webapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neroneroffy%2Freact-music-webapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neroneroffy%2Freact-music-webapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neroneroffy%2Freact-music-webapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neroneroffy","download_url":"https://codeload.github.com/neroneroffy/react-music-webapp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299831,"owners_count":20916190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ant-design","antd-mobile","mongodb","nodejs","react-router","reactjs","redux"],"created_at":"2024-09-24T20:49:01.843Z","updated_at":"2025-04-05T07:04:52.501Z","avatar_url":"https://github.com/neroneroffy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# React音乐webApp(react技术栈)\n\n## 说明：需要cd到client文件夹下安装依赖（npm install）,再 npm start 启动项目\nserver文件夹与backstage当时是打算开发后台的，但后来搁置了，目前没用\n\n\u003e 技术：React16，Redux，React-Router，WebPack\n\n#### [项目演示](http://akongkong.cn/music)\n会点ps,所以自己设计了页面和交互。现在的数据都是是自己mock的，开发后台的时候会对接真实数据，由于搜索、收藏歌单、新建歌单、删除歌单、收藏单曲、移除收藏单曲等功能需要后台配合，所以现在都是纯前端展示，不具备功能\n### 动图演示：\n\n![img](https://github.com/capslocktao/react-music-webapp/blob/master/newshow.gif)\n### 项目描述\n项目基于四个业务模块：**播放器、曲库、发现、个人**。这些模块中包含了一些基础组件来支撑业务逻辑：\n- **歌曲列表组件** ：（应用：曲库-曲库好歌、每日推荐、轮播图二级页面）点击歌曲播放并且高亮，收藏歌曲，将歌曲添加到播放列表；\n- **可编辑歌曲列表组件** ：（应用：我的-收藏的单曲、收藏的歌单，创建的歌单-歌单详情）歌曲列表组件的升级版，并在原有功能上添加了一键顺序播放、移除歌曲；\n- **歌单列表组件** ：（应用：我的-我创建的歌单、我收藏的歌单）点击进入歌单详情、删除歌单；\n- **抛物线小球组件** ：（应用：歌曲列表组件、可编辑歌曲列表组件）点击添加歌曲到播放列表图标时，跳出一个加号代表已经添加进播放列表；\n- **收藏歌曲组件** ：（应用：歌曲列表组件）点击收藏歌曲，弹出选框，用户可选择收藏到单曲列表还是收藏到歌单或者创建歌单（收藏的数据交互待完善）；\n\n\n### 业务模块\n- 播放器内核模块\n  - 上一曲，下一曲，播放，暂停\n  - 点击或拖动进度条实现播放进度的调整\n  - 播放列表的展开收缩\n  - 列表内歌曲的删除\n  - 页面内歌曲添加到播放列表\n  - 播放详情页的展开与收缩\n  - 播放模式选择（顺序播放，随机播放，单曲循环）\n  - 封面图片旋转\n  - 当前播放歌曲高亮显示\n  - 歌词同步（待开发）\n\n- 曲库模块 \n  - redux内请求数据\n  - banner,每日推荐，曲库好歌\n  - banner与每日推荐可点击进入二级页页面，二级页面基于歌曲列表组件构建，展示歌曲列表，实现列表内歌曲点击播放与添加进播放器播放列表\n  - 曲库好歌为直接的列表展示，功能同上\n  - 列表歌曲进场动效展示\n  - 收藏歌曲弹出选项\n \n- 发现\n  - 搜索歌曲（只前端展示静态的搜索结果，待完善）\n  - 排行榜\n  - 风格模块\n \n- 个人模块\n   - 我的资料（待开发）\n   - 修改资料（待完善）\n   - 收藏的单曲\n   - 收藏的歌单\n   - 新建歌单、删除歌单\n   - 移除收藏的单曲\n\n- 登录注册（待开发）\n\n### Redux设计\n![img](https://github.com/capslocktao/react-music-webapp/blob/master/client/redux.png)\n\n首先，这次设计的redux貌似不合理。。有几个没必要放到store里共享的状态也放进去了。大家当反面教材吧。。引入redux-thunk中间件，大部分axios请求都放到了redux中。\nstore内的状态分为8个模块：\n- **album** ：专辑模块信息（专辑列表、专辑详情、专辑内歌曲、专辑介绍）；\n- **comment** ：评论模块（评论内容、是否已经请求回来，收到的回复（暂未开发））；\n- **discovery** ：发现模块（排行榜列表，风格）；\n- **personal** ：个人模块（用户信息、收藏歌单，收藏的歌曲数量，歌单数量）；\n- **repertoire** ：曲库模块（轮播图、每日推荐数据，曲库好歌）；\n- **player** ：播放器内核模块（当前播放的歌曲，待播放歌曲列表，是否应该渲染）；\n- **publicSongs** ：公共的歌曲列表，可编辑歌曲列表和播放器内核共用，这样设计的原因是可编辑播放列表内的一键播放功能需要和播放器内核关联起来，如果点击一键播放，那么顺序播放歌单内歌曲，否则播放完成后播放待播放歌曲列表内歌曲；\n- **song-list-detail** ：歌单详情；\n\n### 项目结构\n![img](https://github.com/capslocktao/react-music-webapp/blob/master/client/project_structure.png)\n\n### 总结\n这项目是在我写的一个[播放器](https://github.com/capslocktao/react-music-player)上扩展来的，同时为了练习一下react全家桶开发的模式。通过几个react实战再加上这个练习，这种开发模式已经基本熟悉了，但是也还停留在写业务代码的阶段，这远远不够。还要学习从0开始构建一个完整的项目。redux这次用的比较多但是还需要深入学习（这个项目使用create-react-app一键创建的）。现在前端开发基本完成了，性能还未做优化。接下来慢慢的要开发后台，提供数据了，优化性能。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneroneroffy%2Freact-music-webapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneroneroffy%2Freact-music-webapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneroneroffy%2Freact-music-webapp/lists"}