From 60c2cad6e221b2dee991d94d5c4537bd16394f8f Mon Sep 17 00:00:00 2001 From: sin <2943460818@qq.com> Date: Thu, 28 Feb 2019 13:46:33 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E5=A2=9E=E5=8A=A0=20Home=20=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E9=BB=98=E8=AE=A4=E9=87=8D=E5=AE=9A=E5=90=91?= =?UTF-8?q?=E8=AF=8D=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin-web/config/router.config.js | 11 +++++++++-- admin-web/src/pages/Home/Home.js | 28 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 admin-web/src/pages/Home/Home.js diff --git a/admin-web/config/router.config.js b/admin-web/config/router.config.js index 429db6aa5..64a10f6c5 100644 --- a/admin-web/config/router.config.js +++ b/admin-web/config/router.config.js @@ -21,6 +21,15 @@ export default [ Routes: ['src/pages/Authorized'], authority: ['admin', 'user'], routes: [ + // redirect + { path: '/', redirect: '/home' }, + // home + { + path: '/home', + name: 'home', + icon: 'user', + component: './Home/Home', + }, // admin { path: '/admin', @@ -34,8 +43,6 @@ export default [ }, ], }, - // dashboard - { path: '/', redirect: '/dashboard/analysis' }, { path: '/dashboard', name: 'dashboard', diff --git a/admin-web/src/pages/Home/Home.js b/admin-web/src/pages/Home/Home.js new file mode 100644 index 000000000..f334d7ebb --- /dev/null +++ b/admin-web/src/pages/Home/Home.js @@ -0,0 +1,28 @@ +import React, { Component } from 'react'; +import { Button } from 'antd'; +import AuthorityControl from '../../components/AuthorityControl'; +import GlobalAuthority from '../../layouts/GlobalAuthorityContext'; + +export default class Home extends Component { + state = {}; + + render() { + // 定义认证的属性 TODO + const GlobalAuthorityProps = { + user: 'admin', + login: 'success', + authList: { + 'auth.button': true, + }, + }; + + return ( + + + + +

home...

+
+ ); + } +}