diff --git a/src/config.js b/src/config.js index cad0e5fc66b866263ea1bba78f8b1678028b4b36..8705dfd063c4bdbb1c431b98264b67893fd04885 100644 --- a/src/config.js +++ b/src/config.js @@ -1,15 +1,15 @@ // import store from './utils/store'; export default { - baseUrl: 'http://127.0.0.1:8080', + baseUrl: 'http://platform.kuopu.net:9080', storeNameSpace: 'kim', headers: () => ({ Authorization: - 'eyJhbGciOiJIUzI1NiJ9.eyJ1aWQiOjMzLCJ1c24iOiLmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrociLCJzdGEiOjE1NjE0MzAzMzI4NzQsImxpZCI6Im91eWFuZ2JveXUifQ.209scGXfvjPj7KgvXhzrI4ciHg6aTDt8LQ1Z2Nw-ZxA', + 'eyJhbGciOiJIUzI1NiJ9.eyJ1aWQiOjMzLCJ1c24iOiLmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrociLCJzdGEiOjE1NjE2MDE3ODA3NDksImxpZCI6Im91eWFuZ2JveXUifQ.PY2oCcc9ESRVw2UmAnvZddgrl6Ycn2462L7xvI4FCLY', }), resCodeKey: 'code', // 后台正常返回错误编码 resMessageKey: 'message', // 后台正常返回错误编码 successCode: 'sys.success', // 后台正常返回错误编码 - isThrowError: true, + isThrowError: true, // 默认为true copyright: `${new Date().getFullYear()} KIM3.0技术中台部出品`, }; diff --git a/src/global.less b/src/global.less index 01dc7eee7114df2ab2f1007f61ecd6e1436ebca9..ad04cbd76ec42d019939049c4b7fdf07579cff19 100644 --- a/src/global.less +++ b/src/global.less @@ -4,6 +4,7 @@ html, body, #root { height: 100%; + font-size: 62.5%; } .colorWeak { diff --git a/src/layouts/BasicLayout.tsx b/src/layouts/BasicLayout.tsx index 87587feddce05d160dc8eec0b6db873e413ed8b0..94e7b3d40597a4f2113f311b75a3990967367b90 100644 --- a/src/layouts/BasicLayout.tsx +++ b/src/layouts/BasicLayout.tsx @@ -36,7 +36,9 @@ export type BasicLayoutContext = { [K in 'location']: BasicLayoutProps[K] } & { const menuDataRender = (menuList: MenuDataItem[]): MenuDataItem[] => menuList.map(item => { + // 遍历给所有的children加上了[] const localItem = { ...item, children: item.children ? menuDataRender(item.children) : [] }; + // 检查菜单项是否有权限 return Authorized.check(item.authority, localItem, null) as MenuDataItem; }); @@ -115,7 +117,7 @@ const BasicLayout: React.FC = props => { ...routers, ]} footerRender={false} // 不显示footer - menuDataRender={menuDataRender} + menuDataRender={menuDataRender} // 渲染导航菜单列表 formatMessage={formatMessage} rightContentRender={rightProps => } {...props} @@ -123,6 +125,7 @@ const BasicLayout: React.FC = props => { > {children} + {/* 主题设置抽屉 */} diff --git a/src/layouts/BlankLayout.tsx b/src/layouts/BlankLayout.tsx index 35f28e8dfd43a2000d7b28df14626205b76d72a6..e48b005dc6f31286a7f957f5ea76fc10c6efc6b4 100644 --- a/src/layouts/BlankLayout.tsx +++ b/src/layouts/BlankLayout.tsx @@ -1,10 +1,9 @@ import React from 'react'; -import CopyBlock from '@/components/CopyBlock'; const Layout: React.FC = ({ children }) => ( <>
{children}
- + {/* */} ); diff --git a/src/layouts/UserLayout.less b/src/layouts/UserLayout.less index 06dd9ba12e77d44f50be0e7460b362479868b95d..6724067abf65cca291a147703cad05a8b60ce8f6 100755 --- a/src/layouts/UserLayout.less +++ b/src/layouts/UserLayout.less @@ -6,6 +6,9 @@ height: 100vh; overflow: auto; background: @layout-body-background; + .lang { + background: @primary-color; + } .content { padding: 0; } @@ -16,6 +19,7 @@ .ant-layout-footer { background: linear-gradient(#43cec4, #43cec4); .ant-pro-global-footer-copyright { + font-size: 10px; color: rgba(255, 255, 255, 0.6); } } diff --git a/src/layouts/UserLayout.tsx b/src/layouts/UserLayout.tsx index 5fa515239c05ca4431bae5198a6435952f06bf44..33632a4770cc40667797226dc44faf58722e3560 100644 --- a/src/layouts/UserLayout.tsx +++ b/src/layouts/UserLayout.tsx @@ -45,7 +45,7 @@ const UserLayout: React.SFC = props => {
{children}
- + ); diff --git a/src/pages/user/login/index.js b/src/pages/user/login/index.js index bb351e6a8aa323d78ad78b0892e9f62450896a38..1feeb182ea2d34b7b3425cc1eea4c3b2a1c46ef5 100644 --- a/src/pages/user/login/index.js +++ b/src/pages/user/login/index.js @@ -25,7 +25,7 @@ class Login extends React.Component { const { username, password } = this.state; const { dispatch } = this.props; dispatch({ - type: 'login/login', + type: 'userLogin/login', payload: { userName: username, password }, }).then(({ code, data }) => { if (code === 'sys.success') { diff --git a/src/pages/user/login/index.less b/src/pages/user/login/index.less index 46900113b2cfd3a4b62043a5f4542e7ac866d0f0..077fafc019463f71c73779257d3a8c3b99dd2388 100644 --- a/src/pages/user/login/index.less +++ b/src/pages/user/login/index.less @@ -7,13 +7,14 @@ // background-size: cover; background: linear-gradient(@color-primary, @color-primary); width: 100%; - // height: 100vh; + min-height: 500px; + height: calc(~'100vh - 130px'); display: flex; justify-content: center; align-items: center; position: relative; .container { - // height: 500px; + // min-height: 500px; width: 500px; background-color: rgba(255, 255, 255, 0); //border-radius: 4px; diff --git a/src/pages/user/login/models/index.js b/src/pages/user/login/models/index.js index 404d59470f922bec0ad05067af9b782785177abe..24235f10915e741ef63a884dd95900cc22359e1a 100644 --- a/src/pages/user/login/models/index.js +++ b/src/pages/user/login/models/index.js @@ -2,7 +2,7 @@ import { login } from '../services'; const initData = {}; export default { - namespace: 'UserLogin', + namespace: 'userLogin', state: { ...initData, }, diff --git a/src/themes/vars.less b/src/themes/vars.less index 416c1a1a4e5e987f227ca3818172b2d9de86129e..fb8a7e5c45780bede53968932ea2b84051ceed21 100644 --- a/src/themes/vars.less +++ b/src/themes/vars.less @@ -1,3 +1,4 @@ +@import '~antd/es/style/themes/default.less'; /** * author: liu.yang * date: 2018-08-22 09:09:23