Vuejs imitates NetEase cloud music

Vuejs imitates NetEase cloud music

I learned vue in the front-end time. I saw vue1.0 at the beginning, and then I really felt that the technology must be practiced, so I started to use vue2.0 directly. Then it took nearly a week to make a small project for NetEase Cloud Music. At first, I felt that the project was relatively small and there was no need to use vuex, so I didn't use it, but later I found that data streaming was a bit cumbersome, and I would use vuex later.

Use vuejs to imitate NetEase cloud music (realize song listening and search functions)

I learned vue in the front-end time. I saw vue1.0 at the beginning, and then I really felt that the technology must be practiced, so I started to use vue2.0 directly. Then it took nearly a week to make a small project for NetEase Cloud Music. At first, I felt that the project was relatively small and there was no need to use vuex, so I didn't use it, but later I found that data streaming was a bit cumbersome, and I would use vuex later.

Online demo address: https://www.huayifeng.top/Alternate address: http://www.huayifeng.top:8080

Portal

Recommend a project vue+websocket+express+mongodb actual combat project (real-time chat)

Technology stack

  • vue+vue-router (core framework)
  • better-scroll (make the mobile sliding experience more smooth)
  • vue-lazyload (lazy loading of user pictures)
  • nprogress (for loading transition)
  • axios (request)

Function analysis and design

First of all, I first referred to the design and development of some existing APPs, and then decided to make two modules of playlist and search. It mainly focuses on the front-end, and the back-end code is not studied. I would like to thank this classmate for writing the API. . It doesn't matter if you don't have an API, it doesn't affect our development, you can write json data in the following form for simulation:

Write picture description here

vuejs

The routing structure is as follows

Write picture description here

Here are the components

Write picture description here

1. Songlist part: The data is mainly provided by API, and the source code has a specific address. Need to understand the audio tag, unfamiliar students see audio

2. Search part: Bind events by binding @keydown to realize real-time query.

better-scroll

Use: 1. Be sure to use an empty layer to carry

<div ref="helloWrapper">
    <div>
    //你的代码
    </div>
</div>

2. Must be introduced before using in vue

import BScroll from 'better-scroll';

this.helloScroll = new BScroll(this.$refs.helloWrapper, {
  click: true
});

Be sure to use better-scroll after the data is rendered,

this.$nextTick(() => {
  //调用
});

Finally, a few renderings

Write picture description here

Write picture description here

Write picture description here

github project address: https://github.com/hua1995116/musiccloudWebapp/

Online demo address: http://www.qiufengh.com/#/

There are many things that need to be improved, so please feel free to comment. I will continue to improve in the follow-up. If you think it’s okay, please star. Your star is my driving force.

Download Details:

Author: hua1995116

Demo: http://www.huayifeng.top:8080/#/

Source Code: https://github.com/hua1995116/musiccloudWebapp

vuejs vue javascript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

8 Popular Websites That Use The Vue.JS Framework

In this article, we are going to list out the most popular websites using Vue JS as their frontend framework. Vue JS is one of those elite progressive JavaScript frameworks that has huge demand in the web development industry. Many popular websites are developed using Vue in their frontend development because of its imperative features.

Vue Native is a framework to build cross platform native mobile apps using JavaScript

Vue Native is a framework to build cross platform native mobile apps using JavaScript. It is a wrapper around the APIs of React Native. So, with Vue Native, you can do everything that you can do with React Native. With Vue Native, you get

How to Make a Simple Vue Custom Select Component

In this article, you’ll learn how to build a Vue custom select component that can be easily be styled using your own CSS. In fact, it’s the same component that we use in production on Qvault, and you can see it in action on the playground.

Creating a Custom Tooltip Component in Vue

There are plenty of libraries out there that will have you up and running with a good tooltip solution in minutes. However, if you are like me, you are sick and tired of giant dependency trees that have the distinct possibility of breaking at any time.

Vue ShortKey plugin for Vue.js

Vue-ShortKey - The ultimate shortcut plugin to improve the UX .Vue-ShortKey - plugin for VueJS 2.x accepts shortcuts globaly and in a single listener.