From fe5b0a3c5cc8ab641d8604917a0d85dfbd0c1283 Mon Sep 17 00:00:00 2001 From: duanledexianxianxian Date: Fri, 28 Jun 2019 17:21:24 +0800 Subject: [PATCH] sync code --- src/config.js | 1 + src/pages/Authorized.tsx | 1 + src/pages/user/login/models/index.js | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/config.js b/src/config.js index 8705dfd0..ea626cb3 100644 --- a/src/config.js +++ b/src/config.js @@ -12,4 +12,5 @@ export default { successCode: 'sys.success', // 后台正常返回错误编码 isThrowError: true, // 默认为true copyright: `${new Date().getFullYear()} KIM3.0技术中台部出品`, + homePage: '/dashboard/analysis', }; diff --git a/src/pages/Authorized.tsx b/src/pages/Authorized.tsx index 1bfd8267..91bc1045 100644 --- a/src/pages/Authorized.tsx +++ b/src/pages/Authorized.tsx @@ -25,6 +25,7 @@ const getRouteAuthority = (path: string, routeData: Route[]) => { } } }); + console.log('authorities:', authorities); return authorities; }; diff --git a/src/pages/user/login/models/index.js b/src/pages/user/login/models/index.js index 5fa8f4f2..500aff90 100644 --- a/src/pages/user/login/models/index.js +++ b/src/pages/user/login/models/index.js @@ -1,7 +1,8 @@ +import { routerRedux } from 'dva/router'; import { login } from '../services'; import store from '@/utils/store'; -import { routerRedux } from 'dva/router'; import { getPageQuery } from '@/utils'; +import config from '@/config'; const initData = {}; export default { @@ -33,6 +34,8 @@ export default { window.location.href = redirect; return; } + } else { + redirect = config.homePage; } yield put(routerRedux.replace(redirect || '/')); } -- GitLab