import React, { Component } from 'react'; import { Button } from 'antd'; let data = { 404: { text: '抱歉,你访问的页面不存在', img: 'https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg' }, 403: { text: '抱歉,你无权访问该页面', img: 'https://gw.alipayobjects.com/zos/rmsportal/wZcnGqRDyhPOEYFcZDnb.svg' }, 500: { text: '抱歉,服务器出错了', img: 'https://gw.alipayobjects.com/zos/rmsportal/RVRUAYdCGeYNBWoKiIwB.svg' } }; export default class CatchAll extends Component { static defaultProps = { auth: 404 }; render() { const { auth } = this.props; return (

{auth}

{data[auth].text}
); } }