├── static
└── .gitkeep
├── .gitattributes
├── pic
├── 1.png
├── 2.png
├── 3.png
└── 4.png
├── config
├── prod.env.js
├── dev.env.js
└── index.js
├── src
├── assets
│ ├── card.jpg
│ └── logo.png
├── App.vue
├── router
│ └── index.js
├── main.js
└── components
│ ├── Toolbar.vue
│ ├── Drawer.vue
│ └── Container.vue
├── .editorconfig
├── .gitignore
├── .babelrc
├── .postcssrc.js
├── index.html
├── LICENSE
├── package.json
└── README.md
/static/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.js linguist-language=vue
--------------------------------------------------------------------------------
/pic/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itning/DouBanMovieForVue/master/pic/1.png
--------------------------------------------------------------------------------
/pic/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itning/DouBanMovieForVue/master/pic/2.png
--------------------------------------------------------------------------------
/pic/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itning/DouBanMovieForVue/master/pic/3.png
--------------------------------------------------------------------------------
/pic/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itning/DouBanMovieForVue/master/pic/4.png
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | module.exports = {
3 | NODE_ENV: '"production"'
4 | }
5 |
--------------------------------------------------------------------------------
/src/assets/card.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itning/DouBanMovieForVue/master/src/assets/card.jpg
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itning/DouBanMovieForVue/master/src/assets/logo.png
--------------------------------------------------------------------------------
/config/dev.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const prodEnv = require('./prod.env')
4 |
5 | module.exports = merge(prodEnv, {
6 | NODE_ENV: '"development"'
7 | })
8 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | /dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
8 | # Editor directories and files
9 | .idea
10 | .vscode
11 | *.suo
12 | *.ntvs*
13 | *.njsproj
14 | *.sln
15 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | "modules": false,
5 | "targets": {
6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7 | }
8 | }],
9 | "stage-2"
10 | ],
11 | "plugins": ["transform-vue-jsx", "transform-runtime"]
12 | }
13 |
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | "postcss-import": {},
6 | "postcss-url": {},
7 | // to edit target browsers: use "browserslist" field in package.json
8 | "autoprefixer": {}
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
20 |
21 |
24 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 |
4 | import Container from '../components/Container'
5 |
6 | Vue.use(Router);
7 |
8 | export default new Router({
9 | mode: 'hash',
10 | routes: [
11 | {
12 | path: '/',
13 | redirect: '/in_theaters'
14 | },
15 | {
16 | path: '/:list',
17 | component: Container,
18 | props: true
19 | }
20 | ]
21 | })
22 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | // The Vue build version to load with the `import` command
2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3 | import Vue from 'vue'
4 | import App from './App'
5 | import router from './router'
6 | import VueResource from 'vue-resource'
7 |
8 | Vue.config.productionTip = false;
9 |
10 | Vue.use(VueResource);
11 |
12 | /* eslint-disable no-new */
13 | new Vue({
14 | el: '#app',
15 | router,
16 | components: {App},
17 | template: ''
18 | });
19 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 豆瓣电影 Power By Vue.JS
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/components/Toolbar.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 a1837634447
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "douban_movie_for_vue",
3 | "version": "1.0.0",
4 | "description": "A project that displays movie information DouBan api use Vue.js",
5 | "author": "ITNING <3579677768@qq.com>",
6 | "private": true,
7 | "scripts": {
8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
9 | "start": "npm run dev",
10 | "build": "node build/build.js"
11 | },
12 | "dependencies": {
13 | "vue": "^2.5.2",
14 | "vue-resource": "^1.3.5",
15 | "vue-router": "^3.0.1"
16 | },
17 | "devDependencies": {
18 | "autoprefixer": "^7.1.2",
19 | "babel-core": "^6.26.3",
20 | "babel-helper-vue-jsx-merge-props": "^2.0.3",
21 | "babel-loader": "^7.1.1",
22 | "babel-plugin-syntax-jsx": "^6.18.0",
23 | "babel-plugin-transform-runtime": "^6.22.0",
24 | "babel-plugin-transform-vue-jsx": "^3.5.0",
25 | "babel-preset-env": "^1.7.0",
26 | "babel-preset-stage-2": "^6.22.0",
27 | "chalk": "^2.0.1",
28 | "copy-webpack-plugin": "^4.0.1",
29 | "css-loader": "^0.28.11",
30 | "extract-text-webpack-plugin": "^3.0.2",
31 | "file-loader": "^1.1.4",
32 | "friendly-errors-webpack-plugin": "^1.6.1",
33 | "html-webpack-plugin": "^2.30.1",
34 | "node-notifier": "^5.1.2",
35 | "optimize-css-assets-webpack-plugin": "^3.2.0",
36 | "ora": "^1.2.0",
37 | "portfinder": "^1.0.13",
38 | "postcss-import": "^11.0.0",
39 | "postcss-loader": "^2.0.8",
40 | "postcss-url": "^7.2.1",
41 | "rimraf": "^2.6.0",
42 | "semver": "^5.3.0",
43 | "shelljs": "^0.7.6",
44 | "uglifyjs-webpack-plugin": "^1.1.1",
45 | "url-loader": "^0.5.8",
46 | "vue-loader": "^13.3.0",
47 | "vue-style-loader": "^3.0.1",
48 | "vue-template-compiler": "^2.5.2",
49 | "webpack": "^3.12.0",
50 | "webpack-bundle-analyzer": "^2.9.0",
51 | "webpack-dev-server": "^2.11.3",
52 | "webpack-merge": "^4.1.0"
53 | },
54 | "engines": {
55 | "node": ">= 6.0.0",
56 | "npm": ">= 3.0.0"
57 | },
58 | "browserslist": [
59 | "> 1%",
60 | "last 2 versions",
61 | "not ie <= 8"
62 | ]
63 | }
64 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | // Template version: 1.3.1
3 | // see http://vuejs-templates.github.io/webpack for documentation.
4 |
5 | const path = require('path')
6 |
7 | module.exports = {
8 | dev: {
9 |
10 | // Paths
11 | assetsSubDirectory: 'static',
12 | assetsPublicPath: '/',
13 | proxyTable: {},
14 |
15 | // Various Dev Server settings
16 | host: 'localhost', // can be overwritten by process.env.HOST
17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
18 | autoOpenBrowser: false,
19 | errorOverlay: true,
20 | notifyOnErrors: true,
21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
22 |
23 |
24 | /**
25 | * Source Maps
26 | */
27 |
28 | // https://webpack.js.org/configuration/devtool/#development
29 | devtool: 'cheap-module-eval-source-map',
30 |
31 | // If you have problems debugging vue-files in devtools,
32 | // set this to false - it *may* help
33 | // https://vue-loader.vuejs.org/en/options.html#cachebusting
34 | cacheBusting: true,
35 |
36 | cssSourceMap: true
37 | },
38 |
39 | build: {
40 | // Template for index.html
41 | index: path.resolve(__dirname, '../dist/index.html'),
42 |
43 | // Paths
44 | assetsRoot: path.resolve(__dirname, '../dist'),
45 | assetsSubDirectory: 'static',
46 | assetsPublicPath: './',
47 |
48 | /**
49 | * Source Maps
50 | */
51 |
52 | productionSourceMap: true,
53 | // https://webpack.js.org/configuration/devtool/#production
54 | devtool: '#source-map',
55 |
56 | // Gzip off by default as many popular static hosts such as
57 | // Surge or Netlify already gzip all static assets for you.
58 | // Before setting to `true`, make sure to:
59 | // npm install --save-dev compression-webpack-plugin
60 | productionGzip: false,
61 | productionGzipExtensions: ['js', 'css'],
62 |
63 | // Run the build command with an extra argument to
64 | // View the bundle analyzer report after build finishes:
65 | // `npm run build --report`
66 | // Set to `true` or `false` to always turn it on or off
67 | bundleAnalyzerReport: process.env.npm_config_report
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DouBanMovieForVue
2 |
3 | > 使用Vue.JS和豆瓣电影提供的Api创建的电影客户端
4 |
5 | [](https://github.com/itning/DouBanMovieForVue/stargazers)
6 | [](https://github.com/itning/DouBanMovieForVue/network/members)
7 | [](https://github.com/itning/DouBanMovieForVue/watchers)
8 | [](https://github.com/itning?tab=followers)
9 |
10 | [](https://github.com/itning/DouBanMovieForVue/issues)
11 | [](https://github.com/itning/DouBanMovieForVue/blob/master/LICENSE)
12 | [](https://github.com/itning/DouBanMovieForVue/commits)
13 | [](https://github.com/itning/DouBanMovieForVue/releases)
14 | [](https://github.com/itning/DouBanMovieForVue)
15 | [](http://hits.dwyl.io/itning/DouBanMovieForVue)
16 | [](https://github.com/itning/DouBanMovieForVue)
17 |
18 | ## Build Setup
19 |
20 | ``` bash
21 | # install dependencies
22 | npm install
23 |
24 | # serve with hot reload at localhost:8080
25 | npm run dev
26 |
27 | # build for production with minification
28 | npm run build
29 |
30 | # build for production and view the bundle analyzer report
31 | npm run build --report
32 | ```
33 |
34 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
35 |
36 | ## View
37 | [http://itning.top/douban](http://itning.top/douban)
38 |
39 | 
40 | 
41 | 
42 | 
43 |
--------------------------------------------------------------------------------
/src/components/Drawer.vue:
--------------------------------------------------------------------------------
1 |
2 |
37 |
38 |
39 |
87 |
88 |
91 |
--------------------------------------------------------------------------------
/src/components/Container.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
15 |
16 |
{{subject.title}}
17 |
导演:{{director.name}}
18 |
19 |
20 |
演员:{{cast.name}}{{(index!==(subject.casts.length-1))? ',':''}}
21 | 类型:{{genre}}{{(index!==(subject.genres.length-1))? ',':''}}
22 | 年代:{{subject.year}}
23 | 豆瓣评分:{{subject.rating.average}}
24 |
25 |
26 |
27 |
28 |
29 |
141 |
142 |
157 |
--------------------------------------------------------------------------------