diff --git a/.eslintrc.js b/.eslintrc.js index 051199c..53cc55c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -35,6 +35,7 @@ module.exports = { 'import/no-unresolved': 'off', 'import/order': 'off', 'import/prefer-default-export': 'off', + 'import/no-extraneous-dependencies': ['error', { devDependencies: true }], // 关闭variable必须全部大写规则 '@typescript-eslint/naming-convention': [ 'error', diff --git a/package.json b/package.json index 5f1c427..d411db4 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@types/lodash": "^4.14.178", "@types/mockjs": "^1.0.6", "@types/node": "^16.11.18", + "@types/qrcode.react": "^1.0.2", "@types/react": "^17.0.38", "@types/react-dom": "^17.0.11", "@types/react-router-dom": "^5.3.2", @@ -49,6 +50,7 @@ "echarts-for-react": "^3.0.2", "lodash": "^4.17.21", "mockjs": "^1.1.0", + "qrcode.react": "^2.0.0", "query-string": "^6.12.0", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/src/assets/image/assets-login-bg-black.png b/src/assets/image/assets-login-bg-black.png new file mode 100644 index 0000000..b4dde4b Binary files /dev/null and b/src/assets/image/assets-login-bg-black.png differ diff --git a/src/assets/image/assets-login-bg-white.png b/src/assets/image/assets-login-bg-white.png new file mode 100644 index 0000000..4275549 Binary files /dev/null and b/src/assets/image/assets-login-bg-white.png differ diff --git a/src/assets/svg/assets-logo-full.svg b/src/assets/svg/assets-logo-full.svg new file mode 100644 index 0000000..94f0049 --- /dev/null +++ b/src/assets/svg/assets-logo-full.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/configs/menu.ts b/src/configs/menu.ts index 4753d92..6286365 100644 --- a/src/configs/menu.ts +++ b/src/configs/menu.ts @@ -6,6 +6,8 @@ import { LayersIcon, CheckCircleIcon, UserCircleIcon, + LogoutIcon, + RootListIcon, } from 'tdesign-icons-react'; export interface IMenuItem { @@ -154,10 +156,22 @@ export const menu: IMenuItem[] = [ }, ], }, + { + key: 'login', + label: '登录页', + Icon: LogoutIcon, + children: [ + { + key: '/login/index', + label: '登录中心', + path: '/login', + }, + ], + }, { key: 'level1', label: '一级菜单', - Icon: UserCircleIcon, + Icon: RootListIcon, children: [ { key: '/level1/level2', diff --git a/src/configs/routes.ts b/src/configs/routes.ts index 1c26bd9..ed8b1fd 100644 --- a/src/configs/routes.ts +++ b/src/configs/routes.ts @@ -19,6 +19,7 @@ import Result403 from 'pages/Result/403'; import Result404 from 'pages/Result/404'; import Result500 from 'pages/Result/500'; import ResultBrowserIncompatible from 'pages/Result/BrowserIncompatible'; +import Login from 'pages/Login'; interface IRouteItem { key?: string; @@ -26,6 +27,7 @@ interface IRouteItem { exact?: boolean; isHome?: boolean; Component: React.FC; + isFullPage?: boolean; } export const routes: IRouteItem[] = [ @@ -106,4 +108,9 @@ export const routes: IRouteItem[] = [ path: '/result/browser-incompatible', Component: ResultBrowserIncompatible, }, + { + path: '/login', + Component: Login, + isFullPage: true, + }, ]; diff --git a/src/layouts/components/Container.tsx b/src/layouts/components/Container.tsx index a84a782..85c1016 100644 --- a/src/layouts/components/Container.tsx +++ b/src/layouts/components/Container.tsx @@ -2,38 +2,37 @@ import React from 'react'; import { Layout } from 'tdesign-react'; import { ELayout } from 'modules/global'; import Header from './Header'; -import Content from './Content'; import Footer from './Footer'; import Menu from './Menu'; import Style from './Content.module.less'; -const SideLayout = React.memo(() => ( +const SideLayout = React.memo(({ children }: { children: React.ReactNode }) => (
- + {children}