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
6d619771
Commit
6d619771
authored
Mar 02, 2018
by
ddcat1115
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjust category
parent
257e294c
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
35 additions
and
24 deletions
+35
-24
src/common/menu.js
src/common/menu.js
+11
-0
src/common/router.js
src/common/router.js
+13
-13
src/layouts/BasicLayout.js
src/layouts/BasicLayout.js
+2
-2
src/routes/UserProfile/UserCenter.js
src/routes/UserProfile/UserCenter.js
+5
-5
src/routes/UserProfile/UserCenter.less
src/routes/UserProfile/UserCenter.less
+1
-1
src/routes/UserProfile/Userinfo/AccountView.js
src/routes/UserProfile/Userinfo/AccountView.js
+0
-0
src/routes/UserProfile/Userinfo/BaseView.js
src/routes/UserProfile/Userinfo/BaseView.js
+0
-0
src/routes/UserProfile/Userinfo/BaseView.less
src/routes/UserProfile/Userinfo/BaseView.less
+0
-0
src/routes/UserProfile/Userinfo/GeographicView.js
src/routes/UserProfile/Userinfo/GeographicView.js
+0
-0
src/routes/UserProfile/Userinfo/GeographicView.less
src/routes/UserProfile/Userinfo/GeographicView.less
+0
-0
src/routes/UserProfile/Userinfo/Info.js
src/routes/UserProfile/Userinfo/Info.js
+3
-3
src/routes/UserProfile/Userinfo/Info.less
src/routes/UserProfile/Userinfo/Info.less
+0
-0
src/routes/UserProfile/Userinfo/MessageView.js
src/routes/UserProfile/Userinfo/MessageView.js
+0
-0
src/routes/UserProfile/Userinfo/PhoneView.js
src/routes/UserProfile/Userinfo/PhoneView.js
+0
-0
src/routes/UserProfile/Userinfo/PhoneView.less
src/routes/UserProfile/Userinfo/PhoneView.less
+0
-0
src/routes/UserProfile/Userinfo/SafeView.js
src/routes/UserProfile/Userinfo/SafeView.js
+0
-0
No files found.
src/common/menu.js
View file @
6d619771
...
@@ -113,6 +113,17 @@ const menuData = [{
...
@@ -113,6 +113,17 @@ const menuData = [{
name
:
'
注册结果
'
,
name
:
'
注册结果
'
,
path
:
'
register-result
'
,
path
:
'
register-result
'
,
}],
}],
},
{
name
:
'
个人页
'
,
icon
:
'
user
'
,
path
:
'
user-profile
'
,
children
:
[{
name
:
'
个人中心
'
,
path
:
'
user-center
'
,
},
{
name
:
'
个人设置
'
,
path
:
'
userinfo
'
,
}],
}];
}];
function
formatter
(
data
,
parentPath
=
'
/
'
,
parentAuthority
)
{
function
formatter
(
data
,
parentPath
=
'
/
'
,
parentAuthority
)
{
...
...
src/common/router.js
View file @
6d619771
...
@@ -151,9 +151,6 @@ export const getRouterData = (app) => {
...
@@ -151,9 +151,6 @@ export const getRouterData = (app) => {
'
/exception/trigger
'
:
{
'
/exception/trigger
'
:
{
component
:
dynamicWrapper
(
app
,
[
'
error
'
],
()
=>
import
(
'
../routes/Exception/triggerException
'
)),
component
:
dynamicWrapper
(
app
,
[
'
error
'
],
()
=>
import
(
'
../routes/Exception/triggerException
'
)),
},
},
'
/user-center
'
:
{
component
:
dynamicWrapper
(
app
,
[
'
list
'
,
'
user
'
,
'
project
'
],
()
=>
import
(
'
../routes/UserCenter
'
)),
},
'
/user
'
:
{
'
/user
'
:
{
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'
../layouts/UserLayout
'
)),
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'
../layouts/UserLayout
'
)),
},
},
...
@@ -166,20 +163,23 @@ export const getRouterData = (app) => {
...
@@ -166,20 +163,23 @@ export const getRouterData = (app) => {
'
/user/register-result
'
:
{
'
/user/register-result
'
:
{
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'
../routes/User/RegisterResult
'
)),
component
:
dynamicWrapper
(
app
,
[],
()
=>
import
(
'
../routes/User/RegisterResult
'
)),
},
},
'
/userinfo
'
:
{
'
/user-profile/user-center
'
:
{
component
:
dynamicWrapper
(
app
,
[
'
geographic
'
],
()
=>
import
(
'
../routes/Userinfo/Info
'
)),
component
:
dynamicWrapper
(
app
,
[
'
list
'
,
'
user
'
,
'
project
'
],
()
=>
import
(
'
../routes/UserProfile/UserCenter
'
)),
},
'
/user-profile/userinfo
'
:
{
component
:
dynamicWrapper
(
app
,
[
'
geographic
'
],
()
=>
import
(
'
../routes/UserProfile/Userinfo/Info
'
)),
},
},
'
/userinfo/base
'
:
{
'
/user
-profile/user
info/base
'
:
{
component
:
dynamicWrapper
(
app
,
[
'
geographic
'
],
()
=>
import
(
'
../routes/Userinfo/BaseView
'
)),
component
:
dynamicWrapper
(
app
,
[
'
geographic
'
],
()
=>
import
(
'
../routes/User
Profile/User
info/BaseView
'
)),
},
},
'
/userinfo/safe
'
:
{
'
/user
-profile/user
info/safe
'
:
{
component
:
dynamicWrapper
(
app
,
[
'
geographic
'
],
()
=>
import
(
'
../routes/Userinfo/SafeView
'
)),
component
:
dynamicWrapper
(
app
,
[
'
geographic
'
],
()
=>
import
(
'
../routes/User
Profile/User
info/SafeView
'
)),
},
},
'
/userinfo/account
'
:
{
'
/user
-profile/user
info/account
'
:
{
component
:
dynamicWrapper
(
app
,
[
'
geographic
'
],
()
=>
import
(
'
../routes/Userinfo/AccountView
'
)),
component
:
dynamicWrapper
(
app
,
[
'
geographic
'
],
()
=>
import
(
'
../routes/User
Profile/User
info/AccountView
'
)),
},
},
'
/userinfo/message
'
:
{
'
/user
-profile/user
info/message
'
:
{
component
:
dynamicWrapper
(
app
,
[
'
geographic
'
],
()
=>
import
(
'
../routes/Userinfo/MessageView
'
)),
component
:
dynamicWrapper
(
app
,
[
'
geographic
'
],
()
=>
import
(
'
../routes/User
Profile/User
info/MessageView
'
)),
},
},
// '/user/:id': {
// '/user/:id': {
// component: dynamicWrapper(app, [], () => import('../routes/User/SomeComponent')),
// component: dynamicWrapper(app, [], () => import('../routes/User/SomeComponent')),
...
...
src/layouts/BasicLayout.js
View file @
6d619771
...
@@ -128,7 +128,7 @@ class BasicLayout extends React.PureComponent {
...
@@ -128,7 +128,7 @@ class BasicLayout extends React.PureComponent {
}
}
handleMenuClick
=
({
key
})
=>
{
handleMenuClick
=
({
key
})
=>
{
if
(
key
===
'
userCenter
'
)
{
if
(
key
===
'
userCenter
'
)
{
this
.
props
.
dispatch
(
routerRedux
.
push
(
'
/user-center
'
));
this
.
props
.
dispatch
(
routerRedux
.
push
(
'
/user-
profile/user-
center
'
));
return
;
return
;
}
}
if
(
key
===
'
triggerError
'
)
{
if
(
key
===
'
triggerError
'
)
{
...
@@ -136,7 +136,7 @@ class BasicLayout extends React.PureComponent {
...
@@ -136,7 +136,7 @@ class BasicLayout extends React.PureComponent {
return
;
return
;
}
}
if
(
key
===
'
userinfo
'
)
{
if
(
key
===
'
userinfo
'
)
{
this
.
props
.
dispatch
(
routerRedux
.
push
(
'
/userinfo/base
'
));
this
.
props
.
dispatch
(
routerRedux
.
push
(
'
/user
-profile/user
info/base
'
));
return
;
return
;
}
}
if
(
key
===
'
logout
'
)
{
if
(
key
===
'
logout
'
)
{
...
...
src/routes/UserCenter.js
→
src/routes/User
Profile/User
Center.js
View file @
6d619771
...
@@ -5,12 +5,12 @@ import moment from 'moment';
...
@@ -5,12 +5,12 @@ import moment from 'moment';
import
numeral
from
'
numeral
'
;
import
numeral
from
'
numeral
'
;
import
{
List
,
Card
,
Row
,
Col
,
Icon
,
Dropdown
,
import
{
List
,
Card
,
Row
,
Col
,
Icon
,
Dropdown
,
Menu
,
Avatar
,
Tag
,
Divider
,
Tooltip
,
Spin
,
Input
}
from
'
antd
'
;
Menu
,
Avatar
,
Tag
,
Divider
,
Tooltip
,
Spin
,
Input
}
from
'
antd
'
;
import
AvatarList
from
'
../components/AvatarList
'
;
import
AvatarList
from
'
../
../
components/AvatarList
'
;
import
{
formatWan
}
from
'
../utils/utils
'
;
import
{
formatWan
}
from
'
../
../
utils/utils
'
;
import
styles
from
'
./UserCenter.less
'
;
import
styles
from
'
./UserCenter.less
'
;
import
stylesArticles
from
'
./List/Articles.less
'
;
import
stylesArticles
from
'
.
.
/List/Articles.less
'
;
import
stylesApplications
from
'
./List/Applications.less
'
;
import
stylesApplications
from
'
.
.
/List/Applications.less
'
;
import
stylesProjects
from
'
./List/Projects.less
'
;
import
stylesProjects
from
'
.
.
/List/Projects.less
'
;
@
connect
(({
list
,
loading
,
user
,
project
})
=>
({
@
connect
(({
list
,
loading
,
user
,
project
})
=>
({
list
,
list
,
...
...
src/routes/UserCenter.less
→
src/routes/User
Profile/User
Center.less
View file @
6d619771
@import '~antd/lib/style/themes/default.less';
@import '~antd/lib/style/themes/default.less';
@import "../utils/utils.less";
@import "../
../
utils/utils.less";
.avatarHolder {
.avatarHolder {
text-align: center;
text-align: center;
...
...
src/routes/Userinfo/AccountView.js
→
src/routes/User
Profile/User
info/AccountView.js
View file @
6d619771
File moved
src/routes/Userinfo/BaseView.js
→
src/routes/User
Profile/User
info/BaseView.js
View file @
6d619771
File moved
src/routes/Userinfo/BaseView.less
→
src/routes/User
Profile/User
info/BaseView.less
View file @
6d619771
File moved
src/routes/Userinfo/GeographicView.js
→
src/routes/User
Profile/User
info/GeographicView.js
View file @
6d619771
File moved
src/routes/Userinfo/GeographicView.less
→
src/routes/User
Profile/User
info/GeographicView.less
View file @
6d619771
File moved
src/routes/Userinfo/Info.js
→
src/routes/User
Profile/User
info/Info.js
View file @
6d619771
...
@@ -3,7 +3,7 @@ import { connect } from 'dva';
...
@@ -3,7 +3,7 @@ import { connect } from 'dva';
import
{
Route
,
routerRedux
,
Switch
,
Redirect
}
from
'
dva/router
'
;
import
{
Route
,
routerRedux
,
Switch
,
Redirect
}
from
'
dva/router
'
;
import
{
Menu
}
from
'
antd
'
;
import
{
Menu
}
from
'
antd
'
;
import
styles
from
'
./Info.less
'
;
import
styles
from
'
./Info.less
'
;
import
{
getRoutes
}
from
'
../../utils/utils
'
;
import
{
getRoutes
}
from
'
../../
../
utils/utils
'
;
const
{
Item
}
=
Menu
;
const
{
Item
}
=
Menu
;
...
@@ -36,7 +36,7 @@ export default class Info extends Component {
...
@@ -36,7 +36,7 @@ export default class Info extends Component {
return
menuMap
[
this
.
state
.
selectKey
];
return
menuMap
[
this
.
state
.
selectKey
];
};
};
selectKey
=
({
key
})
=>
{
selectKey
=
({
key
})
=>
{
this
.
props
.
dispatch
(
routerRedux
.
push
(
`/userinfo/
${
key
}
`
));
this
.
props
.
dispatch
(
routerRedux
.
push
(
`/user
-profile/user
info/
${
key
}
`
));
this
.
setState
({
this
.
setState
({
selectKey
:
key
,
selectKey
:
key
,
});
});
...
@@ -70,7 +70,7 @@ export default class Info extends Component {
...
@@ -70,7 +70,7 @@ export default class Info extends Component {
exact
=
{
item
.
exact
}
exact
=
{
item
.
exact
}
/
>
/
>
))}
))}
<
Redirect
exact
from
=
"
/user
info
"
to
=
"
/userinfo/base
"
/>
<
Redirect
exact
from
=
"
/user
-profile/userinfo
"
to
=
"
/user-profile
/userinfo/base
"
/>
<
Redirect
to
=
"
/exception/404
"
/>
<
Redirect
to
=
"
/exception/404
"
/>
<
/Switch
>
<
/Switch
>
<
/div
>
<
/div
>
...
...
src/routes/Userinfo/Info.less
→
src/routes/User
Profile/User
info/Info.less
View file @
6d619771
File moved
src/routes/Userinfo/MessageView.js
→
src/routes/User
Profile/User
info/MessageView.js
View file @
6d619771
File moved
src/routes/Userinfo/PhoneView.js
→
src/routes/User
Profile/User
info/PhoneView.js
View file @
6d619771
File moved
src/routes/Userinfo/PhoneView.less
→
src/routes/User
Profile/User
info/PhoneView.less
View file @
6d619771
File moved
src/routes/Userinfo/SafeView.js
→
src/routes/User
Profile/User
info/SafeView.js
View file @
6d619771
File moved
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