diff --git a/app/actions/README.md b/app/actions/README.md deleted file mode 100644 index cf69548..0000000 --- a/app/actions/README.md +++ /dev/null @@ -1 +0,0 @@ -Redux - action \ No newline at end of file diff --git a/app/actions/userinfo.js b/app/actions/userinfo.js index 3044175..d97942c 100644 --- a/app/actions/userinfo.js +++ b/app/actions/userinfo.js @@ -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 } } \ No newline at end of file diff --git a/app/components/HomeHeader/index.jsx b/app/components/HomeHeader/index.jsx index 8d1fa3a..3ab193d 100644 --- a/app/components/HomeHeader/index.jsx +++ b/app/components/HomeHeader/index.jsx @@ -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() { diff --git a/app/constants/userinfo.js b/app/constants/userinfo.js index e538201..57a1cd6 100644 --- a/app/constants/userinfo.js +++ b/app/constants/userinfo.js @@ -1 +1 @@ -export const USERINFO_LOGIN = 'USERINFO_LOGIN' \ No newline at end of file +export const USERINFO_CITYNAME = 'USERINFO_CITYNAME' \ No newline at end of file diff --git a/app/containers/404.jsx b/app/containers/404.jsx index 83e10de..4890c7f 100644 --- a/app/containers/404.jsx +++ b/app/containers/404.jsx @@ -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, } @@ -41,6 +41,4 @@ class NotFound extends React.Component { } } -// 使用 require.ensure 异步加载,还不支持 ES6 的 export -// export default NotFound -module.exports = NotFound \ No newline at end of file +export default NotFound diff --git a/app/containers/City/index.jsx b/app/containers/City/index.jsx index 249523f..ddf9971 100644 --- a/app/containers/City/index.jsx +++ b/app/containers/City/index.jsx @@ -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() { @@ -15,6 +15,4 @@ class City extends React.Component { } } -// 使用 require.ensure 异步加载,还不支持 ES6 的 export -// export default City -module.exports = City +export default City diff --git a/app/containers/Detail/index.jsx b/app/containers/Detail/index.jsx index 32d4966..872349b 100644 --- a/app/containers/Detail/index.jsx +++ b/app/containers/Detail/index.jsx @@ -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() { @@ -15,6 +15,4 @@ class Detail extends React.Component { } } -// 使用 require.ensure 异步加载,还不支持 ES6 的 export -// export default Detail -module.exports = Detail \ No newline at end of file +export default Detail diff --git a/app/containers/Search/index.jsx b/app/containers/Search/index.jsx index 6320771..8ccf1a3 100644 --- a/app/containers/Search/index.jsx +++ b/app/containers/Search/index.jsx @@ -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() { diff --git a/app/containers/index.jsx b/app/containers/index.jsx index eae41a5..8bacde3 100644 --- a/app/containers/index.jsx +++ b/app/containers/index.jsx @@ -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 } diff --git a/app/fetch/README.md b/app/fetch/README.md deleted file mode 100644 index 938014a..0000000 --- a/app/fetch/README.md +++ /dev/null @@ -1 +0,0 @@ -get / post 数据 \ No newline at end of file diff --git a/app/reducers/README.md b/app/reducers/README.md deleted file mode 100644 index d3d2438..0000000 --- a/app/reducers/README.md +++ /dev/null @@ -1 +0,0 @@ -Redux reducers \ No newline at end of file diff --git a/app/reducers/userinfo.js b/app/reducers/userinfo.js index 645ce8b..f31cd70 100644 --- a/app/reducers/userinfo.js +++ b/app/reducers/userinfo.js @@ -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 diff --git a/app/router/README.md b/app/router/README.md deleted file mode 100644 index 4023252..0000000 --- a/app/router/README.md +++ /dev/null @@ -1 +0,0 @@ -路由配置 diff --git a/app/static/README.md b/app/static/README.md deleted file mode 100644 index a3c6197..0000000 --- a/app/static/README.md +++ /dev/null @@ -1 +0,0 @@ -项目公用的静态文件 \ No newline at end of file diff --git a/app/store/README.md b/app/store/README.md deleted file mode 100644 index 645b5b9..0000000 --- a/app/store/README.md +++ /dev/null @@ -1 +0,0 @@ -Redux store \ No newline at end of file