Skip to content

Commit

Permalink
Merge pull request #5 from xingbofeng/dev
Browse files Browse the repository at this point in the history
release:bookmark:: 发布1.3.0版本,准备并入主分支
  • Loading branch information
Encounter committed May 24, 2017
2 parents 8d52f9e + 10c2a78 commit 5e33774
Show file tree
Hide file tree
Showing 27 changed files with 698 additions and 146 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: node_js
node_js:
- "6"

install:
- npm install
- npm run build
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# douban-movie
It is an application,like [电影 - 豆瓣](https://m.douban.com/movie/).

[![downloads-image](http://img.shields.io/npm/dm/douban-movie.svg)](https://github.com/xingbofeng/douban-movie)
[![npm-image](http://img.shields.io/npm/v/douban-movie.svg)](https://github.com/xingbofeng/douban-movie)
[![travis-image](http://img.shields.io/travis/xingbofeng/douban-movie.svg)](https://github.com/xingbofeng/douban-movie)
[![appveyor-image](https://ci.appveyor.com/api/projects/status/bsu9w9ar8pboc2nj?svg=true)](https://github.com/xingbofeng/douban-movie)
[![codeship-image](https://codeship.com/projects/79da7240-5481-0132-ea32-42ab35009c21/status)](https://github.com/xingbofeng/douban-movie)
[![david-dm-image](https://david-dm.org/xingbofeng/douban-movie.svg)](https://github.com/xingbofeng/douban-movie)
[![david-dm-dev-image](https://david-dm.org/xingbofeng/douban-movie/dev-status.svg)](https://github.com/xingbofeng/douban-movie)

It is the douban-movie Application built with webpack + vue + vuex + vue-router + iView.

[中文文档](./README_ZH.md)

Expand All @@ -9,11 +18,6 @@ Enter GitHub to see [code](https://github.com/xingbofeng/douban-movie)!

Thanks for you support, waiting for your `issue`, `pr`, `star` or `follow`!I will release more interesting project in the future!

recommended some project writing by myself.
- [wx-audio](https://github.com/xingbofeng/wx-audio)
- [paintCanvas](https://github.com/xingbofeng/paintCanvas)
- [css-grid-flex](https://github.com/xingbofeng/css-grid-flex)

## Online
[Click Here](https://douban.xingbofeng.com/)

Expand All @@ -30,7 +34,7 @@ yarn run server
```
Then open your browser, and go to http://localhost:3000/ to enjoy it!

## Dev
## Development
```
git clone https://github.com/xingbofeng/douban-movie.git
Expand All @@ -42,7 +46,7 @@ yarn run dev
```
Then open your browser, and go to http://localhost:8080/ to enjoy it!

## Picture.gif
## Preview
![](https://user-gold-cdn.xitu.io/2017/4/23/1e8f797a25d254918d1d0409550e2727.gif)

## Technology stack
Expand All @@ -55,7 +59,7 @@ Then open your browser, and go to http://localhost:8080/ to enjoy it!
- `yarn` package manager.
- `postman` test our interface

## What's this?
## Functions
### src/containers/Home.vue
- [x] hot-movie, comming-soon, top250 and us-box.
- [x] horizontal scrolling.
Expand Down Expand Up @@ -398,7 +402,7 @@ app.use('/v2', proxy({
}
));

app.get('/', function (req, res) {
app.get('/*', function (req, res) {
res.sendFile(__dirname + '/index.html');
});
app.listen(3000);
Expand Down
11 changes: 10 additions & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# douban-movie(豆瓣电影wap版)

[![downloads-image](http://img.shields.io/npm/dm/douban-movie.svg)](https://github.com/xingbofeng/douban-movie)
[![npm-image](http://img.shields.io/npm/v/douban-movie.svg)](https://github.com/xingbofeng/douban-movie)
[![travis-image](http://img.shields.io/travis/xingbofeng/douban-movie.svg)](https://github.com/xingbofeng/douban-movie)
[![appveyor-image](https://ci.appveyor.com/api/projects/status/bsu9w9ar8pboc2nj?svg=true)](https://github.com/xingbofeng/douban-movie)
[![codeship-image](https://codeship.com/projects/79da7240-5481-0132-ea32-42ab35009c21/status)](https://github.com/xingbofeng/douban-movie)
[![david-dm-image](https://david-dm.org/xingbofeng/douban-movie.svg)](https://github.com/xingbofeng/douban-movie)
[![david-dm-dev-image](https://david-dm.org/xingbofeng/douban-movie/dev-status.svg)](https://github.com/xingbofeng/douban-movie)

用vue全家桶仿写豆瓣电影wap版。

最近在公司项目中尝试使用vue,但奈何自己初学水平有限,上了vue没有上vuex,开发过程特别难受。
Expand Down Expand Up @@ -412,7 +421,7 @@ app.use('/v2', proxy({
}
));

app.get('/', function (req, res) {
app.get('/*', function (req, res) {
res.sendFile(__dirname + '/index.html');
});
app.listen(3000);
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"name": "douban-movie",
"version": "1.2.1",
"version": "1.3.0",
"description": "douban movie app",
"author": "xingbofeng <503908971@qq.com>",
"private": true,
"scripts": {
"dev": "node build/dev-server.js",
"build": "node build/build.js",
"unit": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run",
"test": "npm run unit",
"lint": "eslint --ext .js,.vue src test/unit/specs",
"server": "node server/index.js"
},
Expand Down
1 change: 1 addition & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default {
created() {
// 销毁最近所看电影实例
window.localStorage.doubanMovieCurrentPage = '{}';
window.localStorage.doubanMovieCurrentComments = '{}';
},
computed: mapState({
Expand Down
Binary file added src/assets/play-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions src/components/Common/ReviewItem.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<template>
<div class="reviewItem">
<router-link
:to="`/review/${review.id}`"
>
<h3>{{ review.title }}</h3>
<div class="authorDetail">
<strong>{{ review.author.name }}</strong>
<star
:average="average"
:length="0.24"
/>
</div>
<p>{{ review.summary }}</p>
</router-link>
</div>
</template>

<script>
import Star from './Star';
export default {
name: 'ReviewItem',
components: {
Star,
},
props: ['review'],
computed: {
average() {
const { value, max } = this.review.rating;
return (value / max * 10); // eslint-disable-line
},
},
};
</script>

<style scoped>
.reviewItem {
padding: 0.2rem 0.36rem 0.3rem;
}
h3 {
color: #494949;
font-weight: 500;
font-size: 0.34rem;
line-height: 1.41;
margin-bottom: 0.12rem;
}
strong {
color: #494949;
font-size: 0.24rem;
margin-right: 0.04rem;
}
.authorDetail {
display: flex;
align-items: center;
}
p {
color: #aaa;
font-size: 0.24rem;
line-height: 1.5;
margin-top: 0.1rem;
}
</style>
4 changes: 2 additions & 2 deletions src/components/MovieDetail/Infos.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<article>
<router-link
:to="`/tag/${item}`"
v-for="item in currentMovie.genres"
v-for="item in currentMovie.tags"
class="tagItem"
:key="item"
>
Expand All @@ -45,7 +45,7 @@
</article>
</div>
<div>
<h2>影人</h2>
<h2>{{ currentMovie.title }}的导演和主演</h2>
<article class="celebrityItems">
<router-link
:to="`/tag/${item.name}`"
Expand Down
5 changes: 0 additions & 5 deletions src/components/Template.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
<script>
export default {
name: 'Template',
data() {
return {
msg: 'template',
};
},
};
</script>

Expand Down
Loading

0 comments on commit 5e33774

Please sign in to comment.