Skip to content

Commit

Permalink
Update some comments and minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
denven committed Aug 11, 2020
1 parent 2df94da commit da96679
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# NODE_ENV=development

VUE_APP_API_HOST=http://localhost:3000
VUE_APP_API_HOST=http://localhost:3000/
VUE_APP_API_BACKUP=http://localhost:3000
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# MusicBox

A free music web app(desktop version) implemented by Vue.js, mimic of NetEase Music(https://music.163.com/), may be better, may be later ...
A free music web app(desktop version) implemented by Vue.js, mimic of NetEase Music(https://music.163.com/).

## Deployment

AWS EC2: http://ec2-54-191-119-231.us-west-2.compute.amazonaws.com:5600/

## APIs and Icons used
## Stack

- Element-UI Components: https://element.eleme.io/
- Netease Music API: https://github.com/Binaryify/NeteaseCloudMusicApi
- Free Icons: https://www.iconfont.cn/
- Vue + Vuex + Vue router
- Flexbox/CSS grid layout
- [Element-UI Components](https://element.eleme.io/)

## APIs and icons used

- [Netease Music API](https://github.com/Binaryify/NeteaseCloudMusicApi)
- [Iconfont](https://www.iconfont.cn/)

## Project setup

Expand All @@ -20,7 +25,7 @@ npm install

### Prepare the backend

To run the app, you need an API server, see [NeteaseCloudMusicApi](https://github.com/Binaryify/NeteaseCloudMusicApi).
To run the app, you need to build your own API server, read [NeteaseCloudMusicApi](https://github.com/Binaryify/NeteaseCloudMusicApi).

### Compiles and hot-reloads for development

Expand Down
24 changes: 24 additions & 0 deletions src/common/session.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export default {
setPageData: (key, dataObj) => {
let artist = JSON.stringify(dataObj);
sessionStorage.setItem(key, [artist]);
},

getPageData: (key) => {
return JSON.parse(sessionStorage.getItem(key));
},
};

// const setPageData = (key, dataObj) => {
// let artist = JSON.stringify(dataObj);
// sessionStorage.setItem(key, [artist]);
// };

// const getPageData = (key) => {
// return JSON.parse(sessionStorage.getItem(key));
// };

// module.exports = {
// setPageData,
// getPageData,
// };
2 changes: 2 additions & 0 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ Vue.use(Vuex);

export default new Vuex.Store({
state: {
// for music play
song: {
audioUrl: "",
picUrl: "",
name: "",
artist: "",
},
// for search results
curSearchTab: "tracks",
},
mutations: {},
Expand Down
5 changes: 2 additions & 3 deletions src/views/playlists/PlaylistDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,9 @@ export default {
commentCount,
};
this.info.tags = data.playlist.tags; //array
console.log(data.playlist.tags);
this.tracks = [];
this.info.tags = data.playlist.tags; //tags is an array
this.tracks = [];
data.playlist.tracks.forEach((item) => {
let { name, id, dt: duration } = item;
duration = this.$helpers.convertMsToMinutes(duration);
Expand Down

0 comments on commit da96679

Please sign in to comment.