2020-02-12 01:02:23 +08:00
|
|
|
|
import React, { Fragment } from 'react';
|
|
|
|
|
import { formatMessage } from 'umi/locale';
|
|
|
|
|
import Link from 'umi/link';
|
|
|
|
|
import { Icon } from 'antd';
|
|
|
|
|
import GlobalFooter from '@/components/GlobalFooter';
|
|
|
|
|
import SelectLang from '@/components/SelectLang';
|
|
|
|
|
import styles from './UserLayout.less';
|
|
|
|
|
import logo from '../assets/logo.svg';
|
|
|
|
|
|
|
|
|
|
const links = [
|
|
|
|
|
{
|
|
|
|
|
key: 'help',
|
|
|
|
|
title: formatMessage({ id: 'layout.user.link.help' }),
|
|
|
|
|
href: '',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: 'privacy',
|
|
|
|
|
title: formatMessage({ id: 'layout.user.link.privacy' }),
|
|
|
|
|
href: '',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: 'terms',
|
|
|
|
|
title: formatMessage({ id: 'layout.user.link.terms' }),
|
|
|
|
|
href: '',
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const copyright = (
|
|
|
|
|
<Fragment>
|
2020-04-24 18:02:54 +08:00
|
|
|
|
Copyright <Icon type="copyright" /> 2020 SpringBlade{' '}
|
2020-02-12 01:02:23 +08:00
|
|
|
|
<a
|
|
|
|
|
key="github"
|
|
|
|
|
title="git"
|
|
|
|
|
target="_blank"
|
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
|
href="https://gitee.com/smallc/SpringBlade"
|
|
|
|
|
>
|
|
|
|
|
<Icon type="github" />{' '}
|
|
|
|
|
</a>
|
|
|
|
|
</Fragment>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const UserLayout = ({ children }) => (
|
|
|
|
|
// @TODO <DocumentTitle title={this.getPageTitle()}>
|
|
|
|
|
<div className={styles.container}>
|
|
|
|
|
<div className={styles.lang}>
|
|
|
|
|
<SelectLang />
|
|
|
|
|
</div>
|
|
|
|
|
<div className={styles.content}>
|
|
|
|
|
<div className={styles.top}>
|
|
|
|
|
<div className={styles.header}>
|
|
|
|
|
<Link to="/">
|
|
|
|
|
<img alt="logo" className={styles.logo} src={logo} />
|
|
|
|
|
<span className={styles.title}>Sword 企业级开发平台</span>
|
|
|
|
|
</Link>
|
|
|
|
|
</div>
|
|
|
|
|
<div className={styles.desc}>
|
|
|
|
|
Sword是SpringBlade前端UI项目,基于react 、ant design、umi、dva等流行技术栈。
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{children}
|
|
|
|
|
</div>
|
|
|
|
|
<GlobalFooter links={links} copyright={copyright} />
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export default UserLayout;
|