Commit 19001b76 authored by duanledexianxianxian's avatar duanledexianxianxian 😁

sync code

parent 89bacb35
// import store from './utils/store'; // import store from './utils/store';
export default { export default {
baseUrl: 'http://127.0.0.1:8080', baseUrl: 'http://platform.kuopu.net:9080',
storeNameSpace: 'kim', storeNameSpace: 'kim',
headers: () => ({ headers: () => ({
Authorization: Authorization:
'eyJhbGciOiJIUzI1NiJ9.eyJ1aWQiOjMzLCJ1c24iOiLmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrociLCJzdGEiOjE1NjE0MzAzMzI4NzQsImxpZCI6Im91eWFuZ2JveXUifQ.209scGXfvjPj7KgvXhzrI4ciHg6aTDt8LQ1Z2Nw-ZxA', 'eyJhbGciOiJIUzI1NiJ9.eyJ1aWQiOjMzLCJ1c24iOiLmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrociLCJzdGEiOjE1NjE2MDE3ODA3NDksImxpZCI6Im91eWFuZ2JveXUifQ.PY2oCcc9ESRVw2UmAnvZddgrl6Ycn2462L7xvI4FCLY',
}), }),
resCodeKey: 'code', // 后台正常返回错误编码 resCodeKey: 'code', // 后台正常返回错误编码
resMessageKey: 'message', // 后台正常返回错误编码 resMessageKey: 'message', // 后台正常返回错误编码
successCode: 'sys.success', // 后台正常返回错误编码 successCode: 'sys.success', // 后台正常返回错误编码
isThrowError: true, isThrowError: true, // 默认为true
copyright: `${new Date().getFullYear()} KIM3.0技术中台部出品`, copyright: `${new Date().getFullYear()} KIM3.0技术中台部出品`,
}; };
...@@ -4,6 +4,7 @@ html, ...@@ -4,6 +4,7 @@ html,
body, body,
#root { #root {
height: 100%; height: 100%;
font-size: 62.5%;
} }
.colorWeak { .colorWeak {
......
...@@ -36,7 +36,9 @@ export type BasicLayoutContext = { [K in 'location']: BasicLayoutProps[K] } & { ...@@ -36,7 +36,9 @@ export type BasicLayoutContext = { [K in 'location']: BasicLayoutProps[K] } & {
const menuDataRender = (menuList: MenuDataItem[]): MenuDataItem[] => const menuDataRender = (menuList: MenuDataItem[]): MenuDataItem[] =>
menuList.map(item => { menuList.map(item => {
// 遍历给所有的children加上了[]
const localItem = { ...item, children: item.children ? menuDataRender(item.children) : [] }; const localItem = { ...item, children: item.children ? menuDataRender(item.children) : [] };
// 检查菜单项是否有权限
return Authorized.check(item.authority, localItem, null) as MenuDataItem; return Authorized.check(item.authority, localItem, null) as MenuDataItem;
}); });
...@@ -115,7 +117,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = props => { ...@@ -115,7 +117,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = props => {
...routers, ...routers,
]} ]}
footerRender={false} // 不显示footer footerRender={false} // 不显示footer
menuDataRender={menuDataRender} menuDataRender={menuDataRender} // 渲染导航菜单列表
formatMessage={formatMessage} formatMessage={formatMessage}
rightContentRender={rightProps => <RightContent {...rightProps} />} rightContentRender={rightProps => <RightContent {...rightProps} />}
{...props} {...props}
...@@ -123,6 +125,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = props => { ...@@ -123,6 +125,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = props => {
> >
{children} {children}
</ProLayout> </ProLayout>
{/* 主题设置抽屉 */}
<SettingDrawer <SettingDrawer
settings={settings} settings={settings}
onSettingChange={config => onSettingChange={config =>
......
import React from 'react'; import React from 'react';
import CopyBlock from '@/components/CopyBlock';
const Layout: React.FC = ({ children }) => ( const Layout: React.FC = ({ children }) => (
<> <>
<div>{children}</div> <div>{children}</div>
<CopyBlock id={Date.now()} /> {/* <CopyBlock id={Date.now()} /> */}
</> </>
); );
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
height: 100vh; height: 100vh;
overflow: auto; overflow: auto;
background: @layout-body-background; background: @layout-body-background;
.lang {
background: @primary-color;
}
.content { .content {
padding: 0; padding: 0;
} }
...@@ -16,6 +19,7 @@ ...@@ -16,6 +19,7 @@
.ant-layout-footer { .ant-layout-footer {
background: linear-gradient(#43cec4, #43cec4); background: linear-gradient(#43cec4, #43cec4);
.ant-pro-global-footer-copyright { .ant-pro-global-footer-copyright {
font-size: 10px;
color: rgba(255, 255, 255, 0.6); color: rgba(255, 255, 255, 0.6);
} }
} }
......
...@@ -45,7 +45,7 @@ const UserLayout: React.SFC<UserLayoutProps> = props => { ...@@ -45,7 +45,7 @@ const UserLayout: React.SFC<UserLayoutProps> = props => {
<SelectLang locales={DefaultSettings.locales} /> <SelectLang locales={DefaultSettings.locales} />
</div> </div>
<div className={styles.content}>{children}</div> <div className={styles.content}>{children}</div>
<DefaultFooter copyright={config.copyright} links={[]} /> <DefaultFooter copyright={config.copyright} links={[]}/>
</div> </div>
</DocumentTitle> </DocumentTitle>
); );
......
...@@ -25,7 +25,7 @@ class Login extends React.Component { ...@@ -25,7 +25,7 @@ class Login extends React.Component {
const { username, password } = this.state; const { username, password } = this.state;
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({
type: 'login/login', type: 'userLogin/login',
payload: { userName: username, password }, payload: { userName: username, password },
}).then(({ code, data }) => { }).then(({ code, data }) => {
if (code === 'sys.success') { if (code === 'sys.success') {
......
...@@ -7,13 +7,14 @@ ...@@ -7,13 +7,14 @@
// background-size: cover; // background-size: cover;
background: linear-gradient(@color-primary, @color-primary); background: linear-gradient(@color-primary, @color-primary);
width: 100%; width: 100%;
// height: 100vh; min-height: 500px;
height: calc(~'100vh - 130px');
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
position: relative; position: relative;
.container { .container {
// height: 500px; // min-height: 500px;
width: 500px; width: 500px;
background-color: rgba(255, 255, 255, 0); background-color: rgba(255, 255, 255, 0);
//border-radius: 4px; //border-radius: 4px;
......
...@@ -2,7 +2,7 @@ import { login } from '../services'; ...@@ -2,7 +2,7 @@ import { login } from '../services';
const initData = {}; const initData = {};
export default { export default {
namespace: 'UserLogin', namespace: 'userLogin',
state: { state: {
...initData, ...initData,
}, },
......
@import '~antd/es/style/themes/default.less';
/** /**
* author: liu.yang * author: liu.yang
* date: 2018-08-22 09:09:23 * 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