|
|
@ -4,20 +4,20 @@ import { Row, Col, Spin, Card, Statistic, Progress } from 'antd';
|
|
|
|
import { stores_Context } from '../config';
|
|
|
|
import { stores_Context } from '../config';
|
|
|
|
import { useNavigate } from 'react-router-dom';
|
|
|
|
import { useNavigate } from 'react-router-dom';
|
|
|
|
import { SlackOutlined, SketchOutlined, AntCloudOutlined, RedditOutlined, GithubOutlined, ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons';
|
|
|
|
import { SlackOutlined, SketchOutlined, AntCloudOutlined, RedditOutlined, GithubOutlined, ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons';
|
|
|
|
import { isEmpty } from './../utils/commons';
|
|
|
|
import { empty } from './../utils/commons';
|
|
|
|
import './home.css';
|
|
|
|
import './home.css';
|
|
|
|
|
|
|
|
|
|
|
|
const Home = () => {
|
|
|
|
const Home = () => {
|
|
|
|
const navigate = useNavigate();
|
|
|
|
const navigate = useNavigate();
|
|
|
|
const { TradeStore } = useContext(stores_Context);
|
|
|
|
const { TradeStore } = useContext(stores_Context);
|
|
|
|
const { yearlyData, summaryData } = TradeStore;
|
|
|
|
const { sideData, summaryData } = TradeStore;
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
if (isEmpty(summaryData?.result1)) {
|
|
|
|
if (empty(summaryData?.errcode)) {
|
|
|
|
TradeStore.fetchSummaryData();
|
|
|
|
TradeStore.fetchSummaryData();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (isEmpty(yearlyData?.result1)) {
|
|
|
|
if (empty(sideData?.errcode)) {
|
|
|
|
TradeStore.fetchTradeData();
|
|
|
|
TradeStore.fetchTradeDataByMonth();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return () => {};
|
|
|
|
return () => {};
|
|
|
|
}, []);
|
|
|
|
}, []);
|
|
|
@ -67,8 +67,10 @@ const Home = () => {
|
|
|
|
</Row>
|
|
|
|
</Row>
|
|
|
|
</Spin>
|
|
|
|
</Spin>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<h3>市场进度</h3>
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
|
|
|
<section>
|
|
|
|
<Spin spinning={yearlyData.loading}></Spin>
|
|
|
|
<Spin spinning={sideData.loading}></Spin>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
);
|
|
|
|