Commit 19001b76 authored by duanledexianxianxian's avatar duanledexianxianxian 😁

sync code

parent 89bacb35
// 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技术中台部出品`,
};
......@@ -4,6 +4,7 @@ html,
body,
#root {
height: 100%;
font-size: 62.5%;
}
.colorWeak {
......
......@@ -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<BasicLayoutProps> = props => {
...routers,
]}
footerRender={false} // 不显示footer
menuDataRender={menuDataRender}
menuDataRender={menuDataRender} // 渲染导航菜单列表
formatMessage={formatMessage}
rightContentRender={rightProps => <RightContent {...rightProps} />}
{...props}
......@@ -123,6 +125,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = props => {
>
{children}
</ProLayout>
{/* 主题设置抽屉 */}
<SettingDrawer
settings={settings}
onSettingChange={config =>
......
import React from 'react';
import CopyBlock from '@/components/CopyBlock';
const Layout: React.FC = ({ children }) => (
<>
<div>{children}</div>
<CopyBlock id={Date.now()} />
{/* <CopyBlock id={Date.now()} /> */}
</>
);
......
......@@ -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);
}
}
......
......@@ -45,7 +45,7 @@ const UserLayout: React.SFC<UserLayoutProps> = props => {
<SelectLang locales={DefaultSettings.locales} />
</div>
<div className={styles.content}>{children}</div>
<DefaultFooter copyright={config.copyright} links={[]} />
<DefaultFooter copyright={config.copyright} links={[]}/>
</div>
</DocumentTitle>
);
......
......@@ -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') {
......
......@@ -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;
......
......@@ -2,7 +2,7 @@ import { login } from '../services';
const initData = {};
export default {
namespace: 'UserLogin',
namespace: 'userLogin',
state: {
...initData,
},
......
@import '~antd/es/style/themes/default.less';
/**
* author: liu.yang
* date: 2018-08-22 09:09:23
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment