Convert Figma logo to code with AI

jeneser logodouban

Awesome douban DEMO created with Vue2.x + Vuex + Vue-router + Superagent

2,304
709
2,304
5

Top Related Projects

7,747

wxParse-微信小程序富文本解析自定义组件,支持HTML及markdown解析

20,416

基于 Vue.js 的小程序开发框架,从底层支持 Vue.js 语法和构建工具体系。

微信小程序开发资源汇总 :100:

35,461

开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/

轻量、可靠的小程序 UI 组件库

Quick Overview

jeneser/douban is a mobile web app that replicates the functionality of Douban, a popular Chinese social networking service focused on movie, book, and music reviews. This project is built using Vue.js and aims to provide a responsive and user-friendly interface for accessing Douban's features on mobile devices.

Pros

  • Built with Vue.js, offering a modern and reactive user interface
  • Responsive design, optimized for mobile devices
  • Implements key features of Douban, including movie, book, and music reviews
  • Well-structured codebase, making it easy for developers to understand and contribute

Cons

  • Limited to mobile web, not available as a native mobile app
  • May not include all features of the official Douban service
  • Potential legal issues due to replicating a proprietary service without official authorization
  • Documentation is primarily in Chinese, which may limit accessibility for non-Chinese speakers

Code Examples

Here are a few code examples from the project:

  1. Vue component for displaying a movie item:
<template>
  <div class="item">
    <a :href="'#/movie/' + item.id" class="item-link">
      <img :src="item.images.large" alt="cover">
      <span class="item-title">{{ item.title }}</span>
      <rating :rating="item.rating"></rating>
    </a>
  </div>
</template>

<script>
import Rating from '../Rating.vue'

export default {
  name: 'item',
  props: ['item'],
  components: { Rating }
}
</script>
  1. API request using Axios:
import axios from 'axios'

export function fetch (url) {
  return new Promise((resolve, reject) => {
    axios.get(url)
      .then(response => resolve(response.data))
      .catch(error => reject(error))
  })
}
  1. Vuex store module for handling movie data:
import { fetch } from '../../../utils/fetch'

const state = {
  hotMovies: [],
  newMovies: [],
  topMovies: []
}

const mutations = {
  SET_HOT_MOVIES (state, movies) {
    state.hotMovies = movies
  },
  SET_NEW_MOVIES (state, movies) {
    state.newMovies = movies
  },
  SET_TOP_MOVIES (state, movies) {
    state.topMovies = movies
  }
}

const actions = {
  fetchHotMovies ({ commit }) {
    return fetch('/api/movie/in_theaters')
      .then(res => {
        commit('SET_HOT_MOVIES', res.subjects)
      })
  },
  // ... other actions
}

export default {
  state,
  mutations,
  actions
}

Getting Started

To get started with the jeneser/douban project:

  1. Clone the repository:

    git clone https://github.com/jeneser/douban.git
    cd douban
    
  2. Install dependencies:

    npm install
    
  3. Start the development server:

    npm run dev
    
  4. Build for production:

    npm run build
    

The app will be available at http://localhost:8080 during development.

Competitor Comparisons

7,747

wxParse-微信小程序富文本解析自定义组件,支持HTML及markdown解析

Pros of wxParse

  • Specialized for parsing and rendering rich text in WeChat Mini Programs
  • Supports a wider range of HTML tags and attributes
  • More actively maintained with recent updates

Cons of wxParse

  • Limited to WeChat Mini Program environment
  • Requires more setup and configuration
  • Larger file size and potentially higher performance overhead

Code Comparison

wxParse:

var WxParse = require('../../wxParse/wxParse.js');
Page({
  onLoad: function () {
    var article = '<div>Hello World</div>';
    WxParse.wxParse('article', 'html', article, this, 5);
  }
})

douban:

Page({
  data: {
    title: 'Hello World'
  },
  onLoad: function () {
    // No additional parsing required
  }
})

Key Differences

  • douban is a complete Douban client app, while wxParse is a utility library
  • douban focuses on displaying Douban content, wxParse on parsing HTML/Markdown
  • wxParse offers more flexibility for rich text rendering
  • douban provides a more streamlined experience for Douban-specific features

Use Cases

  • Choose wxParse for projects requiring complex rich text rendering in WeChat Mini Programs
  • Opt for douban when building a Douban-centric application with minimal text parsing needs
20,416

基于 Vue.js 的小程序开发框架,从底层支持 Vue.js 语法和构建工具体系。

Pros of mpvue

  • Built on Vue.js, offering a familiar framework for web developers
  • Supports multiple platforms, including WeChat Mini Program, Alipay Mini Program, and H5
  • Provides better performance optimization for mini programs

Cons of mpvue

  • Less focused on a specific application (like Douban for movies/books)
  • May have a steeper learning curve for developers new to Vue.js
  • Requires additional configuration for platform-specific features

Code Comparison

mpvue:

<template>
  <div class="container">
    <ul class="list">
      <li v-for="item in items" :key="item.id">{{ item.name }}</li>
    </ul>
  </div>
</template>

douban:

<template>
  <view class="container">
    <view class="list">
      <view v-for="item in items" :key="item.id">{{ item.title }}</view>
    </view>
  </view>
</template>

Summary

mpvue is a more versatile framework built on Vue.js, supporting multiple platforms and offering better performance optimization. However, it may be more complex for beginners. douban, on the other hand, is more focused on a specific application (Douban) and may be easier to use for developers familiar with WeChat Mini Program syntax. The code comparison shows similarities in structure, with mpvue using standard HTML tags and douban using WeChat Mini Program components.

微信小程序开发资源汇总 :100:

Pros of awesome-wechat-weapp

  • Comprehensive collection of WeChat Mini Program resources
  • Regularly updated with new tools, libraries, and tutorials
  • Large community support with over 37,000 stars

Cons of awesome-wechat-weapp

  • Not a functional application, just a curated list of resources
  • Lacks practical implementation examples
  • May be overwhelming for beginners due to the vast amount of information

Code comparison

awesome-wechat-weapp is primarily a markdown file with links and descriptions, so there's no relevant code to compare. douban, on the other hand, is a functional application. Here's a sample of its code structure:

// douban/src/views/MovieView.vue
<template>
  <div class="movie-view has-header">
    <banner :title="bannerTitle"></banner>
    <div class="content">
      <card></card>
    </div>
  </div>
</template>

Summary

awesome-wechat-weapp serves as an extensive resource hub for WeChat Mini Program development, while douban is a practical implementation of a movie database application. The former is ideal for developers seeking a wide range of tools and resources, while the latter provides a concrete example of building a functional app using Vue.js and integrating with the Douban API.

35,461

开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/

Pros of Taro

  • Supports multiple platforms (React Native, WeChat Mini Program, Alipay Mini Program, etc.)
  • Larger community and more active development (30k+ stars, frequent updates)
  • Comprehensive documentation and extensive ecosystem

Cons of Taro

  • Steeper learning curve due to its multi-platform nature
  • Larger bundle size and potentially slower performance in some cases
  • May require additional configuration for platform-specific features

Code Comparison

Taro (React-based):

import { Component } from 'react'
import { View, Text } from '@tarojs/components'

export default class Index extends Component {
  render() {
    return (
      <View>
        <Text>Hello, Taro!</Text>
      </View>
    )
  }
}

Douban (Vue-based):

<template>
  <div>
    <p>{{ message }}</p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      message: 'Hello, Douban!'
    }
  }
}
</script>

Summary

Taro is a more versatile and actively maintained framework, suitable for cross-platform development. It offers a wider range of features and community support. However, it may be more complex to set up and use compared to Douban, which is a simpler, Vue-based project focused on replicating the Douban app interface. The choice between the two depends on project requirements, target platforms, and developer familiarity with React or Vue ecosystems.

轻量、可靠的小程序 UI 组件库

Pros of vant-weapp

  • More comprehensive UI component library with 50+ components
  • Better maintained with frequent updates and active community
  • Extensive documentation and examples for easier implementation

Cons of vant-weapp

  • Larger file size and potentially higher complexity
  • Less focused on a specific application (like Douban for movies/books)
  • May require more customization for specialized use cases

Code Comparison

vant-weapp (Button component usage):

<van-button type="primary" size="large">Large Button</van-button>

douban (Movie component usage):

<template>
  <view class="movie-card">
    <image :src="movie.images.large" mode="aspectFill"></image>
    <text class="title">{{movie.title}}</text>
  </view>
</template>

Summary

vant-weapp is a more comprehensive UI component library for WeChat Mini Programs, offering a wide range of components and better maintenance. It's suitable for various applications but may require more customization for specific use cases. douban, on the other hand, is a more focused project specifically tailored for a Douban-like application, which may be easier to implement for similar use cases but lacks the versatility of vant-weapp.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README


Awesome douban DEMO created with Vue2.x + Vuex + Vue-router + Superagent

Build Status David Codacy Badge Powered Percentage of issues still open Average time to resolve an issue PR 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

# 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.

Libraries

  • 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

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 and 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 Copyright (c) 2017 Jeneser