diff --git a/spug_web/src/pages/home/StatisticCard.js b/spug_web/src/pages/home/StatisticCard.js index 2288eba..78dda48 100644 --- a/spug_web/src/pages/home/StatisticCard.js +++ b/spug_web/src/pages/home/StatisticCard.js @@ -4,7 +4,7 @@ * Released under the AGPL-3.0 License. */ import React from 'react'; -import {Statistic, Card, Row, Col} from 'antd'; +import { Statistic, Card, Row, Col } from 'antd'; import { http } from 'libs'; export default class StatisticCard extends React.Component { @@ -15,6 +15,7 @@ export default class StatisticCard extends React.Component { res: {} } } + componentDidMount() { http.get('/api/home/statistic/') .then(res => this.setState({res})) @@ -27,22 +28,22 @@ export default class StatisticCard extends React.Component { - + {v}} suffix="个"/> - + {v}} suffix="台"/> - + {v}} suffix="个"/> - + {v}} suffix="项"/>