https://github.com/jeneser/douban
Awesome douban DEMO created with Vue2.x + Vuex + Vue-router + Superagent
https://github.com/jeneser/douban
douban superagent vue-cli vue-demo vue-resoure vue-router vue2 vuex webpack2
Last synced: 2 months ago
JSON representation
Awesome douban DEMO created with Vue2.x + Vuex + Vue-router + Superagent
- Host: GitHub
- URL: https://github.com/jeneser/douban
- Owner: jeneser
- License: mit
- Created: 2017-02-25T14:31:20.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-05T07:20:09.000Z (about 8 years ago)
- Last Synced: 2025-05-22T19:11:21.721Z (7 months ago)
- Topics: douban, superagent, vue-cli, vue-demo, vue-resoure, vue-router, vue2, vuex, webpack2
- Language: Vue
- Homepage: https://jeneser.github.io/douban
- Size: 11.2 MB
- Stars: 2,303
- Watchers: 116
- Forks: 704
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-vue - **Douban** - router** + **vue-resource**. by [jeneser](https://github.com/jeneser) (Resources / Examples)
- awesome-vue - **Douban** - Awesome douban DEMO created with Vue2.x + Vuex + Vue-router + Superagent ` ๐ 4 years ago ` (Examples [๐](#readme))
- awesome-vue - douban - ๅบไบvueๅ จๅฎถๆกถ็็ฒพ่ด่ฑ็ฃDEMO (Demo็คบไพ)
- awesome - douban - ๅบไบvueๅ จๅฎถๆกถ็็ฒพ่ด่ฑ็ฃDEMO (Demo็คบไพ)
- awesome-vue-zh - **่ฑ็ฃ**
- awesome-github-star - douban - router + Superagent | jeneser | 2309 | (Vue)
- awesome-vue - douban - ๅบไบvueๅ จๅฎถๆกถ็็ฒพ่ด่ฑ็ฃDEMO (Demo็คบไพ)
- awesome-github-vue - douban - ๅบไบvueๅ จๅฎถๆกถ็็ฒพ่ด่ฑ็ฃDEMO (Demo็คบไพ)
- awesome-github-vue - douban - ๅบไบvueๅ จๅฎถๆกถ็็ฒพ่ด่ฑ็ฃDEMO (Demo็คบไพ)
- awesome-vue - **Douban** โ 2000 - router** + **vue-resource**. by [jeneser](https://github.com/jeneser) (Awesome Vue.js [ โ 101652](https://github.com/sindresorhus/awesome) / Examples)
- awesome-vue - **Douban** - router** + **vue-resource**. by [jeneser](https://github.com/jeneser) (Awesome Vue.js [](https://github.com/sindresorhus/awesome) / Examples)
README
Awesome douban DEMO created with Vue2.x + Vuex + Vue-router + Superagent
[](https://travis-ci.org/jeneser/douban) [](https://github.com/jeneser/douban) [](https://www.codacy.com/app/jeneser/douban?utm_source=github.com&utm_medium=referral&utm_content=jeneser/douban&utm_campaign=Badge_Grade) [](https://github.com/vuejs/vue) [](http://isitmaintained.com/project/jeneser/douban "Percentage of issues still open") [](http://isitmaintained.com/project/jeneser/douban "Average time to resolve an issue") [](https://github.com/jeneser/douban/pulls) [](https://github.com/jeneser/douban/blob/master/LICENSE)
......
Live Demo
## Features
- 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
......
## Build Setup
``` bash
# 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](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
## Libraries
- [Vuex](https://vuex.vuejs.org) : Centralized State Management for Vue.js
- [Vue-router](http://router.vuejs.org/) : The official router for Vue.js
- ~~[vue-resource](https://github.com/pagekit/vue-resource) : The HTTP client for Vue.js~~
- [Superagent](https://github.com/visionmedia/superagent) : Ajax with less suck - (and node.js HTTP client to match)
- [vue-infinite-loading](https://github.com/PeachScript/vue-infinite-loading) : An infinite scroll plugin for Vue.js 1.0 & Vue.js 2.0.
- [normalize.css](https://github.com/necolas/normalize.css) : A collection of HTML element and attribute style-normalizations
- [vue-scroll-behavior](https://www.npmjs.com/package/vue-scroll-behavior) : Completely customize the scroll behavior on route navigation
## API
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`
- Movie
- In theaters : `/movie/in_theaters?count=`
- Coming soon : `/movie/coming_soon?count=`
- Top 250 : `/movie/top250?count=`
- Single movie info : `/movie/subject/id`
- Book
- Search some books : `/book/search?q=&count=`
- Single book info : `/book/id`
- Search
- Search books : `/book/search?q=`
- Search movie : `/movie/search?q=`
- Search music : `/music/search?q=`
Mock Douban Backend
- User Basic URI : `https://douban.herokuapp.com/user/`
- Register
- Path: `/user`
- method: `POST`
- Login
- Path: `/user/:id`
- method: `GET`
For detailed explanation, checkout the [Douban Api V2](https://developers.douban.com/wiki/?title=api_v2) and [Douban Backend](https://github.com/jeneser/douban-backend)
## File Structure
```
.
โโโ 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
```
## Change log
- Aug 24, 2017:
- Merged PR #19
- Remove dist/, use tschaub/gh-pages
- Aug 11, 2017:
- Add dir /screenshot.
- Update README fix screenshot
- June 24, 2017:
- Update vue-scroll-behavior fix scroll behavior
- May 28, 2017:
- Using superagent
## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request
## Thanks
## License
[MIT](https://github.com/jeneser/douban/blob/master/LICENSE) Copyright (c) 2017 [Jeneser](https://jeneser.github.io/)