diff --git a/src/locales/en-US.js b/src/locales/en-US.js index 6540955af5bbc33541d6aef6ba7c6f5aac4f9f2c..89284b54b2307eac9c25e2749bf96aecfbade897 100644 --- a/src/locales/en-US.js +++ b/src/locales/en-US.js @@ -121,4 +121,8 @@ export default { 'The to-do list will be notified in the form of a letter from the station', 'app.settings.open': 'Open', 'app.settings.close': 'Close', + 'app.exception.back': 'Back to home', + 'app.exception.description.403': "Sorry, you don't have access to this page", + 'app.exception.description.404': 'Sorry, the page you visited does not exist', + 'app.exception.description.500': 'Sorry, the server is reporting an error', }; diff --git a/src/locales/zh-CN.js b/src/locales/zh-CN.js index 84d7b5e0e450dbd57fefff85d1c5c96d705ee0a7..09b67be8c9b74a16bde2a3eccdba05d8d8f9b09b 100644 --- a/src/locales/zh-CN.js +++ b/src/locales/zh-CN.js @@ -117,4 +117,8 @@ export default { 'app.settings.notification.todo-description': '账户密码', 'app.settings.open': '开', 'app.settings.close': '关', + 'app.exception.back': '返回首页', + 'app.exception.description.403': '抱歉,你无权访问该页面', + 'app.exception.description.404': '抱歉,你访问的页面不存在', + 'app.exception.description.500': '抱歉,服务器出错了', }; diff --git a/src/pages/Exception/403.js b/src/pages/Exception/403.js index c6d86fe0ab1b5d7edee4c59d0b14d7a7f15dd241..15681eeaf562ee9c777bbe9902579b16d6241b12 100644 --- a/src/pages/Exception/403.js +++ b/src/pages/Exception/403.js @@ -1,7 +1,19 @@ -import React from 'react'; +import React, { Component } from 'react'; +import { injectIntl } from 'react-intl'; import { Link } from 'dva/router'; import Exception from 'components/Exception'; -export default () => ( - -); +class Exception403 extends Component { + render() { + const { intl } = this.props; + return ( + + ); + } +} +export default injectIntl(Exception403); diff --git a/src/pages/Exception/404.js b/src/pages/Exception/404.js index 0a3d87669618364fc9a69139341b58e49eca807e..62be537ea7f4fdfae967dad4954ca2736b134522 100644 --- a/src/pages/Exception/404.js +++ b/src/pages/Exception/404.js @@ -1,7 +1,19 @@ -import React from 'react'; +import React, { Component } from 'react'; +import { injectIntl } from 'react-intl'; import { Link } from 'dva/router'; import Exception from 'components/Exception'; -export default () => ( - -); +class Exception404 extends Component { + render() { + const { intl } = this.props; + return ( + + ); + } +} +export default injectIntl(Exception404); diff --git a/src/pages/Exception/500.js b/src/pages/Exception/500.js index 40f659cb616f1108fbabf89c5672aeb4b16c2184..f4227a99da31f737f887c6a627f50dc333d31627 100644 --- a/src/pages/Exception/500.js +++ b/src/pages/Exception/500.js @@ -1,7 +1,19 @@ -import React from 'react'; +import React, { Component } from 'react'; +import { injectIntl } from 'react-intl'; import { Link } from 'dva/router'; import Exception from 'components/Exception'; -export default () => ( - -); +class Exception500 extends Component { + render() { + const { intl } = this.props; + return ( + + ); + } +} +export default injectIntl(Exception500);