Awesome douban DEMO created with Vue2.x + Vuex + Vue-router + Superagent
......
Live Demo
- Vue + vue-router + vuex + Superagent working together
- Vuex divide store into modules
- Modern JavaScript syntax with ES6
- vue-cli webpack template
- Single-file Vue Components
- API request seperated
- Real remote API and some mock data
- eslint linter integration
- Hot-reload in development
- Css with Sass
- No third party CSS framework
- Complex and different style view logic
- Infinite loading list
- Complete search logic
- Custom components like List, Rating, Tags ...
- Authentication with JSON Web Tokens
- Complete register login logic ......
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
For detailed explanation on how things work, checkout the guide and docs for vue-loader.
- Vuex : Centralized State Management for Vue.js
- Vue-router : The official router for Vue.js
vue-resource : The HTTP client for Vue.js- Superagent : Ajax with less suck - (and node.js HTTP client to match)
- vue-infinite-loading : An infinite scroll plugin for Vue.js 1.0 & Vue.js 2.0.
- normalize.css : A collection of HTML element and attribute style-normalizations
- vue-scroll-behavior : Completely customize the scroll behavior on route navigation
Douban Api V2
- Basic URI :
https://api.douban.com/V2/
- Online activities
- Activities list :
/event/list?loc=108288&count=&start=
- Single activitie info :
/event/id
- Activities list :
- Movie
- In theaters :
/movie/in_theaters?count=
- Coming soon :
/movie/coming_soon?count=
- Top 250 :
/movie/top250?count=
- Single movie info :
/movie/subject/id
- In theaters :
- Book
- Search some books :
/book/search?q=&count=
- Single book info :
/book/id
- Search some books :
- Search
- Search books :
/book/search?q=
- Search movie :
/movie/search?q=
- Search music :
/music/search?q=
- Search books :
Mock Douban Backend
- User Basic URI :
https://douban.herokuapp.com/user/
- Register
- Path:
/user
- method:
POST
- Path:
- Login
- Path:
/user/:id
- method:
GET
- Path:
For detailed explanation, checkout the Douban Api V2 and Douban Backend
.
βββ build
β βββ build.js
β βββ check-versions.js
β βββ dev-client.js
β βββ dev-server.js
β βββ utils.js
β βββ vue-loader.conf.js
β βββ webpack.base.conf.js
β βββ webpack.dev.conf.js
β βββ webpack.prod.conf.js
βββ config
β βββ dev.env.js
β βββ index.js
β βββ prod.env.js
βββ index.html
βββ LICENSE
βββ package.json
βββ README.md
βββ src
β βββ App.vue
β βββ assets
β β βββ avatar.png
β β βββ book_zw.jpg
β β βββ camera.svg
β β βββ douban-app-logo.png
β β βββ pen.svg
β β βββ promotion_bg.jpg
β β βββ user_normal.jpg
β βββ components
β β βββ Banner.vue
β β βββ Card.vue
β β βββ DownloadApp.vue
β β βββ Group.vue
β β βββ HeaderBar.vue
β β βββ List.vue
β β βββ Rating.vue
β β βββ Scroller.vue
β β βββ Marking.vue
β β βββ SubNav.vue
β β βββ Tags.vue
β β βββ Types.vue
β β βββ UserBar.vue
β βββ main.js
β βββ router
β β βββ index.js
β βββ store
β β βββ index.js
β β βββ modules
β β βββ activities.js
β β βββ book.js
β β βββ group.js
β β βββ movie.js
β β βββ search.js
β β βββ subject.js
β β βββ user.js
β βββ views
β βββ BookView.vue
β βββ DetailView.vue
β βββ GroupView.vue
β βββ HomeView.vue
β βββ LoginView.vue
β βββ MovieView.vue
β βββ PagesView.vue
β βββ RegisterView.vue
β βββ SearchView.vue
β βββ StatusView.vue
β βββ SubjectView.vue
β βββ TalionView.vue
βββ static
βββ logo.png
- June 24, 2017:
- Update vue-scroll-behavior fix scroll behavior
- May 28, 2017:
- Using superagent
MIT Copyright (c) 2017 Jeneser