Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
19001b76
Commit
19001b76
authored
Jun 27, 2019
by
duanledexianxianxian
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync code
parent
89bacb35
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
20 additions
and
11 deletions
+20
-11
src/config.js
src/config.js
+3
-3
src/global.less
src/global.less
+1
-0
src/layouts/BasicLayout.tsx
src/layouts/BasicLayout.tsx
+4
-1
src/layouts/BlankLayout.tsx
src/layouts/BlankLayout.tsx
+1
-2
src/layouts/UserLayout.less
src/layouts/UserLayout.less
+4
-0
src/layouts/UserLayout.tsx
src/layouts/UserLayout.tsx
+1
-1
src/pages/user/login/index.js
src/pages/user/login/index.js
+1
-1
src/pages/user/login/index.less
src/pages/user/login/index.less
+3
-2
src/pages/user/login/models/index.js
src/pages/user/login/models/index.js
+1
-1
src/themes/vars.less
src/themes/vars.less
+1
-0
No files found.
src/config.js
View file @
19001b76
// import store from './utils/store';
export
default
{
baseUrl
:
'
http://
127.0.0.1:8
080
'
,
baseUrl
:
'
http://
platform.kuopu.net:9
080
'
,
storeNameSpace
:
'
kim
'
,
headers
:
()
=>
({
Authorization
:
'
eyJhbGciOiJIUzI1NiJ9.eyJ1aWQiOjMzLCJ1c24iOiLmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrociLCJzdGEiOjE1NjE
0MzAzMzI4NzQsImxpZCI6Im91eWFuZ2JveXUifQ.209scGXfvjPj7KgvXhzrI4ciHg6aTDt8LQ1Z2Nw-ZxA
'
,
'
eyJhbGciOiJIUzI1NiJ9.eyJ1aWQiOjMzLCJ1c24iOiLmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrofmrKfpmLPljZrlrociLCJzdGEiOjE1NjE
2MDE3ODA3NDksImxpZCI6Im91eWFuZ2JveXUifQ.PY2oCcc9ESRVw2UmAnvZddgrl6Ycn2462L7xvI4FCLY
'
,
}),
resCodeKey
:
'
code
'
,
// 后台正常返回错误编码
resMessageKey
:
'
message
'
,
// 后台正常返回错误编码
successCode
:
'
sys.success
'
,
// 后台正常返回错误编码
isThrowError
:
true
,
isThrowError
:
true
,
// 默认为true
copyright
:
`
${
new
Date
().
getFullYear
()}
KIM3.0技术中台部出品`
,
};
src/global.less
View file @
19001b76
...
...
@@ -4,6 +4,7 @@ html,
body,
#root {
height: 100%;
font-size: 62.5%;
}
.colorWeak {
...
...
src/layouts/BasicLayout.tsx
View file @
19001b76
...
...
@@ -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
=>
...
...
src/layouts/BlankLayout.tsx
View file @
19001b76
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()} /> */
}
</>
);
...
...
src/layouts/UserLayout.less
View file @
19001b76
...
...
@@ -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);
}
}
...
...
src/layouts/UserLayout.tsx
View file @
19001b76
...
...
@@ -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
>
);
...
...
src/pages/user/login/index.js
View file @
19001b76
...
...
@@ -25,7 +25,7 @@ class Login extends React.Component {
const
{
username
,
password
}
=
this
.
state
;
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'
l
ogin/login
'
,
type
:
'
userL
ogin/login
'
,
payload
:
{
userName
:
username
,
password
},
}).
then
(({
code
,
data
})
=>
{
if
(
code
===
'
sys.success
'
)
{
...
...
src/pages/user/login/index.less
View file @
19001b76
...
...
@@ -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;
...
...
src/pages/user/login/models/index.js
View file @
19001b76
...
...
@@ -2,7 +2,7 @@ import { login } from '../services';
const
initData
=
{};
export
default
{
namespace
:
'
U
serLogin
'
,
namespace
:
'
u
serLogin
'
,
state
:
{
...
initData
,
},
...
...
src/themes/vars.less
View file @
19001b76
@import '~antd/es/style/themes/default.less';
/**
* author: liu.yang
* date: 2018-08-22 09:09:23
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment