Skip to content

Commit

Permalink
删除多余代码
Browse files Browse the repository at this point in the history
  • Loading branch information
yusine-prog committed Sep 2, 2017
1 parent a8de1e1 commit 9b73d74
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 37 deletions.
1 change: 0 additions & 1 deletion app/actions/README.md

This file was deleted.

9 changes: 1 addition & 8 deletions app/actions/userinfo.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
import * as actionTypes from '../constants/userinfo'

export function login(data) {
return {
type: actionTypes.USERINFO_LOGIN,
data
}
}

export function update(data) {
return {
type: actionTypes.USERINFO_LOGIN,
type: actionTypes.USERINFO_CITYNAME,
data
}
}
4 changes: 2 additions & 2 deletions app/components/HomeHeader/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react'
import PureRenderMixin from 'react-addons-pure-render-mixin'
import './index.less'
class User extends React.Component {
constructor(props, context) {
super(props, context);
constructor() {
super();
this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
}
render() {
Expand Down
2 changes: 1 addition & 1 deletion app/constants/userinfo.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const USERINFO_LOGIN = 'USERINFO_LOGIN'
export const USERINFO_CITYNAME = 'USERINFO_CITYNAME'
8 changes: 3 additions & 5 deletions app/containers/404.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react'
import PureRenderMixin from 'react-addons-pure-render-mixin'
import { hashHistory, Link } from 'react-router'
class NotFound extends React.Component {
constructor(props, context) {
super(props, context);
constructor() {
super();
this.state = {
time: 5,
}
Expand Down Expand Up @@ -41,6 +41,4 @@ class NotFound extends React.Component {
}
}

// 使用 require.ensure 异步加载,还不支持 ES6 的 export
// export default NotFound
module.exports = NotFound
export default NotFound
8 changes: 3 additions & 5 deletions app/containers/City/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react'
import PureRenderMixin from 'react-addons-pure-render-mixin'

class City extends React.Component {
constructor(props, context) {
super(props, context);
constructor() {
super();
this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
}
render() {
Expand All @@ -15,6 +15,4 @@ class City extends React.Component {
}
}

// 使用 require.ensure 异步加载,还不支持 ES6 的 export
// export default City
module.exports = City
export default City
8 changes: 3 additions & 5 deletions app/containers/Detail/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react'
import PureRenderMixin from 'react-addons-pure-render-mixin'

class Detail extends React.Component {
constructor(props, context) {
super(props, context);
constructor() {
super();
this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
}
render() {
Expand All @@ -15,6 +15,4 @@ class Detail extends React.Component {
}
}

// 使用 require.ensure 异步加载,还不支持 ES6 的 export
// export default Detail
module.exports = Detail
export default Detail
4 changes: 2 additions & 2 deletions app/containers/Search/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react'
import PureRenderMixin from 'react-addons-pure-render-mixin'

class Search extends React.Component {
constructor(props, context) {
super(props, context);
constructor() {
super();
this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
}
render() {
Expand Down
4 changes: 2 additions & 2 deletions app/containers/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import 'normalize.css'
import '../static/css/iconfont.css'

class App extends React.Component {
constructor(props, context) {
super(props, context);
constructor() {
super();
this.state = {
initDone: false
}
Expand Down
1 change: 0 additions & 1 deletion app/fetch/README.md

This file was deleted.

1 change: 0 additions & 1 deletion app/reducers/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion app/reducers/userinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const initialState = {}

export default function userinfo (state = initialState, action) {
switch (action.type) {
case actionTypes.USERINFO_LOGIN:
case actionTypes.USERINFO_CITYNAME:
return action.data
default:
return state
Expand Down
1 change: 0 additions & 1 deletion app/router/README.md

This file was deleted.

1 change: 0 additions & 1 deletion app/static/README.md

This file was deleted.

1 change: 0 additions & 1 deletion app/store/README.md

This file was deleted.

0 comments on commit 9b73d74

Please sign in to comment.