Unverified Commit 77f223e0 authored by afc163's avatar afc163

remove useless state loading

parent 0bbbcc72
...@@ -18,7 +18,6 @@ const OfflineData = React.lazy(() => import('./OfflineData')); ...@@ -18,7 +18,6 @@ const OfflineData = React.lazy(() => import('./OfflineData'));
})) }))
class Analysis extends Component { class Analysis extends Component {
state = { state = {
loading: true,
salesType: 'all', salesType: 'all',
currentTabKey: '', currentTabKey: '',
rangePickerValue: getTimeDistance('year'), rangePickerValue: getTimeDistance('year'),
...@@ -31,11 +30,6 @@ class Analysis extends Component { ...@@ -31,11 +30,6 @@ class Analysis extends Component {
type: 'chart/fetch', type: 'chart/fetch',
}); });
}); });
setTimeout(() => {
this.setState({
loading: false,
});
}, 2000);
} }
componentWillUnmount() { componentWillUnmount() {
...@@ -96,9 +90,8 @@ class Analysis extends Component { ...@@ -96,9 +90,8 @@ class Analysis extends Component {
}; };
render() { render() {
const { rangePickerValue, salesType, currentTabKey, loading: stateLoading } = this.state; const { rangePickerValue, salesType, currentTabKey } = this.state;
const { chart, loading: propsLoading } = this.props; const { chart, loading } = this.props;
const loading = stateLoading || propsLoading;
const { const {
visitData, visitData,
visitData2, visitData2,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment