Merge pull request #147 from zuiidea/4.0-dev

4.0 dev
This commit is contained in:
zuiidea
2017-03-27 20:28:41 +08:00
committed by GitHub
3 changed files with 14 additions and 12 deletions
+7 -7
View File
@@ -99,24 +99,24 @@ let dataKey = mockStorge('Dashboard', Mock.mock({
},
numbers: [
{
icon: 'pay-circle-o',
icon: 'message',
color: color.green,
title: 'Online Review',
title: '总浏览PV',
number: 2781,
}, {
icon: 'team',
color: color.blue,
title: 'New Customers',
title: '总浏览UV',
number: 3241,
}, {
icon: 'message',
icon: 'shopping-cart',
color: color.purple,
title: 'Active Projects',
title: '成交订单数',
number: 253,
}, {
icon: 'shopping-cart',
icon: 'pay-circle-o',
color: color.red,
title: 'Referrals',
title: '交易额',
number: 4324,
},
],
+4
View File
@@ -66,6 +66,9 @@ class DataTable extends React.Component {
...fetchData,
},
}).then((result) => {
if (!this.refs.DataTable) {
return
}
const { pagination } = this.state
pagination.total = result.total || pagination.total
this.setState({
@@ -81,6 +84,7 @@ class DataTable extends React.Component {
const { loading, dataSource, pagination } = this.state
return (<Table
ref="DataTable"
bordered
loading={loading}
onChange={this.handleTableChange}
+3 -5
View File
@@ -204,11 +204,9 @@ export default {
payload,
}, { call, put }) {
const myCityResult = yield call(myCity, { flg: 0 })
const myCityData = myCityResult.query.results.json
const result = yield call(queryWeather, { cityCode: myCityData.selectCityCode })
const data = result.query.results.json
const weather = zuimei.parseActualData(data.data.actual)
weather.city = myCityData.selectCityName
const result = yield call(queryWeather, { cityCode: myCityResult.selectCityCode })
const weather = zuimei.parseActualData(result.data.actual)
weather.city = myCityResult.selectCityName
yield put({ type: 'queryWeatherSuccess', payload: {
weather,