import React, { useEffect } from 'react'; import { message, Spin } from 'antd'; import { getURLInformation, isEmpty } from '@/utils/CommonUtils'; import { history } from 'umi'; const Loading: React.FC<{}> = () => { /** * 寻找商机中转页 */ useEffect(() => { //获取必要参数 //项目编号 const number = getURLInformation('number') === null ? '' : getURLInformation('number'); //菜单类型 const type = getURLInformation('type') === null ? '' : getURLInformation('type'); if (isEmpty(type)) { message.error('缺少必要参数,请重试'); } else { let params = {} isEmpty(number) ? null : params['number'] = number if (type == 'procurement_mode_1' || type == 'procurement_mode_2') {//招标类 history.push({ pathname: '/Bid/FindBusiness', query: { ...params } }); } else if (type == 'procurement_mode_5' || type == 'procurement_mode_6') {//谈判类 history.push({ pathname: '/Negotiation/FindBusiness', query: { ...params } }); } else if (type == 'procurement_mode_4') {//招募类 history.push({ pathname: '/Recruit/FindBusiness', query: { ...params } }); } else if (type == 'procurement_mode_3') {//比选类 history.push({ pathname: '/Comparison/FindBusiness', query: { ...params } }); } else { message.error('参数错误,请联系管理员'); } } }, []); return (
); }; export default Loading;