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
931e27fb
Commit
931e27fb
authored
Jul 10, 2018
by
ζι
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add acount center
parent
dc5b0f67
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
222 additions
and
242 deletions
+222
-242
config/config.js
config/config.js
+26
-43
src/pages/Account/Center/Applications.js
src/pages/Account/Center/Applications.js
+81
-73
src/pages/Account/Center/Articles.js
src/pages/Account/Center/Articles.js
+63
-55
src/pages/Account/Center/Center.js
src/pages/Account/Center/Center.js
+4
-19
src/pages/Account/Center/Projects.js
src/pages/Account/Center/Projects.js
+45
-37
src/pages/Account/Settings/Info.js
src/pages/Account/Settings/Info.js
+3
-15
No files found.
config/config.js
View file @
931e27fb
...
...
@@ -76,6 +76,32 @@ export default {
{
path
:
'
/exception/403
'
,
component
:
'
./Exception/403
'
},
{
path
:
'
/exception/404
'
,
component
:
'
./Exception/404
'
},
{
path
:
'
/exception/500
'
,
component
:
'
./Exception/500
'
},
// acount
{
path
:
'
/acount/center
'
,
component
:
'
./Account/Center/Center
'
,
routes
:
[
{
path
:
'
/acount/center
'
,
redirect
:
'
/acount/center/articles
'
},
{
path
:
'
/acount/center/articles
'
,
component
:
'
./Account/Center/Articles
'
},
{
path
:
'
/acount/center/applications
'
,
component
:
'
./Account/Center/Applications
'
},
{
path
:
'
/acount/center/projects
'
,
component
:
'
./Account/Center/Projects
'
},
],
},
{
path
:
'
/acount/settings
'
,
component
:
'
./Account/Settings/Info
'
,
routes
:
[
{
path
:
'
/acount/settings
'
,
redirect
:
'
/acount/settings/base
'
},
{
path
:
'
/acount/center/base
'
,
component
:
'
./Account/Settings/BaseView
'
},
{
path
:
'
/acount/center/security
'
,
component
:
'
./Account/Settings/SecurityView
'
},
{
path
:
'
/acount/center/binding
'
,
component
:
'
./Account/Settings/BindingView
'
},
{
path
:
'
/acount/center/notification
'
,
component
:
'
./Account/Settings/NotificationView
'
,
},
],
},
],
},
],
...
...
@@ -135,46 +161,3 @@ export default {
},
},
};
// [
// {
// "path": "/Dashboard",
// "exact": true,
// "redirect": "/Dashboard/Analysis"
// },
// {
// "path": "/Forms",
// "exact": true,
// "redirect": "/Forms/BasicForm"
// },
// {
// "path": "/Forms/StepForm",
// "exact": true,
// "redirect": "/Forms/StepForm/Step1"
// },
// {
// "path": "/List",
// "exact": true,
// "redirect": "/List/TableList"
// },
// {
// "path": "/List/Search",
// "exact": true,
// "redirect": "/List/Search/Articles"
// },
// {
// "path": "/Profile",
// "exact": true,
// "redirect": "/Profile/BasicProfile"
// },
// {
// "path": "/Result",
// "exact": true,
// "redirect": "/Result/Success"
// },
// {
// "path": "/Exception",
// "exact": true,
// "redirect": "/Exception/403"
// }
// ]
src/pages/Account/Center/Applications.js
View file @
931e27fb
import
React
from
'
react
'
;
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
List
,
Card
,
Icon
,
Dropdown
,
Menu
,
Avatar
,
Tooltip
}
from
'
antd
'
;
import
numeral
from
'
numeral
'
;
import
{
connect
}
from
'
dva
'
;
import
{
formatWan
}
from
'
../../../utils/utils
'
;
import
stylesApplications
from
'
../../List/
Search/
Applications.less
'
;
import
stylesApplications
from
'
../../List/Applications.less
'
;
export
default
props
=>
{
const
{
list
}
=
props
;
@
connect
(({
list
})
=>
({
list
,
}))
export
default
class
Center
extends
PureComponent
{
render
()
{
const
{
list
:
{
list
},
}
=
this
.
props
;
const
itemMenu
=
(
<
Menu
>
<
Menu
.
Item
>
...
...
@@ -75,4 +82,5 @@ export default props => {
)}
/
>
);
};
}
}
src/pages/Account/Center/Articles.js
View file @
931e27fb
import
React
from
'
react
'
;
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
List
,
Icon
,
Avatar
,
Tag
}
from
'
antd
'
;
import
moment
from
'
moment
'
;
import
stylesArticles
from
'
../../List/Search/Articles.less
'
;
import
{
connect
}
from
'
dva
'
;
import
stylesArticles
from
'
../../List/Articles.less
'
;
import
styles
from
'
./Articles.less
'
;
export
default
props
=>
{
const
{
list
}
=
props
;
@
connect
(({
list
})
=>
({
list
,
}))
export
default
class
Center
extends
PureComponent
{
render
()
{
const
{
list
:
{
list
},
}
=
this
.
props
;
const
IconText
=
({
type
,
text
})
=>
(
<
span
>
<
Icon
type
=
{
type
}
style
=
{{
marginRight
:
8
}}
/
>
...
...
@@ -57,4 +64,5 @@ export default props => {
)}
/
>
);
};
}
}
src/pages/Account/Center/Center.js
View file @
931e27fb
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Link
,
routerRedux
,
Route
,
Switch
,
Redirect
}
from
'
dva/router
'
;
import
{
Link
,
routerRedux
}
from
'
dva/router
'
;
import
{
Card
,
Row
,
Col
,
Icon
,
Avatar
,
Tag
,
Divider
,
Spin
,
Input
}
from
'
antd
'
;
import
{
getRoutes
}
from
'
../../../utils/utils
'
;
import
GridContent
from
'
../../layouts/GridContent
'
;
import
styles
from
'
./Center.less
'
;
@
connect
(({
list
,
loading
,
user
,
project
})
=>
({
list
,
@
connect
(({
loading
,
user
,
project
})
=>
({
listLoading
:
loading
.
effects
[
'
list/fetch
'
],
currentUser
:
user
.
currentUser
,
currentUserLoading
:
loading
.
effects
[
'
user/fetchCurrent
'
],
...
...
@@ -83,17 +81,15 @@ export default class Center extends PureComponent {
render
()
{
const
{
newTags
,
inputVisible
,
inputValue
}
=
this
.
state
;
const
{
list
:
{
list
},
listLoading
,
currentUser
,
currentUserLoading
,
project
:
{
notice
},
projectLoading
,
match
,
routerData
,
location
,
children
,
}
=
this
.
props
;
const
routes
=
getRoutes
(
match
.
path
,
routerData
);
const
operationTabList
=
[
{
...
...
@@ -207,18 +203,7 @@ export default class Center extends PureComponent {
onTabChange
=
{
this
.
onTabChange
}
loading
=
{
listLoading
}
>
<
Switch
>
{
routes
.
map
(
item
=>
(
<
Route
key
=
{
item
.
key
}
path
=
{
item
.
path
}
render
=
{
props
=>
<
item
.
component
{...
props
}
list
=
{
list
}
/>
}
exact
=
{
item
.
exact
}
/
>
))}
<
Redirect
exact
from
=
"
/account/center
"
to
=
"
/account/center/articles
"
/>
<
Redirect
to
=
"
/exception/404
"
/>
<
/Switch
>
{
children
}
<
/Card
>
<
/Col
>
<
/Row
>
...
...
src/pages/Account/Center/Projects.js
View file @
931e27fb
import
React
from
'
react
'
;
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
List
,
Card
}
from
'
antd
'
;
import
moment
from
'
moment
'
;
import
{
connect
}
from
'
dva
'
;
import
AvatarList
from
'
../../../components/AvatarList
'
;
import
stylesProjects
from
'
../../List/
Search/
Projects.less
'
;
import
stylesProjects
from
'
../../List/Projects.less
'
;
export
default
props
=>
{
const
{
list
}
=
props
;
@
connect
(({
list
})
=>
({
list
,
}))
export
default
class
Center
extends
PureComponent
{
render
()
{
const
{
list
:
{
list
},
}
=
this
.
props
;
return
(
<
List
className
=
{
stylesProjects
.
coverCardList
}
...
...
@@ -39,4 +46,5 @@ export default props => {
)}
/
>
);
};
}
}
src/pages/Account/Settings/Info.js
View file @
931e27fb
import
React
,
{
Component
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Route
,
routerRedux
,
Switch
,
Redirect
}
from
'
dva/router
'
;
import
{
routerRedux
}
from
'
dva/router
'
;
import
{
Menu
}
from
'
antd
'
;
import
styles
from
'
./Info.less
'
;
import
{
getRoutes
}
from
'
../../../utils/utils
'
;
import
GridContent
from
'
../../layouts/GridContent
'
;
const
{
Item
}
=
Menu
;
...
...
@@ -86,7 +85,7 @@ export default class Info extends Component {
};
render
()
{
const
{
match
,
routerData
,
currentUser
}
=
this
.
props
;
const
{
children
,
currentUser
}
=
this
.
props
;
if
(
!
currentUser
.
userid
)
{
return
''
;
}
...
...
@@ -106,18 +105,7 @@ export default class Info extends Component {
<
/div
>
<
div
className
=
{
styles
.
right
}
>
<
div
className
=
{
styles
.
title
}
>
{
this
.
getRightTitle
()}
<
/div
>
<
Switch
>
{
getRoutes
(
match
.
path
,
routerData
).
map
(
item
=>
(
<
Route
key
=
{
item
.
key
}
path
=
{
item
.
path
}
render
=
{
props
=>
<
item
.
component
{...
props
}
currentUser
=
{
currentUser
}
/>
}
exact
=
{
item
.
exact
}
/
>
))}
<
Redirect
exact
from
=
"
/account/settings
"
to
=
"
/account/settings/base
"
/>
<
Redirect
to
=
"
/exception/404
"
/>
<
/Switch
>
{
children
}
<
/div
>
<
/div
>
<
/GridContent
>
...
...
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