Top Related Projects
wxParse-微信小程序富文本解析自定义组件,支持HTML及markdown解析
基于 Vue.js 的小程序开发框架,从底层支持 Vue.js 语法和构建工具体系。
微信小程序开发资源汇总 :100:
开放式跨端跨框架解决方案,支持使用 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:
- 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>
- 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))
})
}
- 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:
-
Clone the repository:
git clone https://github.com/jeneser/douban.git cd douban
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Build for production:
npm run build
The app will be available at http://localhost:8080
during development.
Competitor Comparisons
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
基于 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.
开放式跨端跨框架解决方案,支持使用 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 designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Awesome douban DEMO created with Vue2.x + Vuex + Vue-router + Superagent
......
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
- 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
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
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
Thanks
License
Top Related Projects
wxParse-微信小程序富文本解析自定义组件,支持HTML及markdown解析
基于 Vue.js 的小程序开发框架,从底层支持 Vue.js 语法和构建工具体系。
微信小程序开发资源汇总 :100:
开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/
轻量、可靠的小程序 UI 组件库
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot