Commit f87d7371 authored by ddcat1115's avatar ddcat1115 Committed by jim

better url #1072

parent ed0b743c
......@@ -116,13 +116,13 @@ const menuData = [{
}, {
name: '个人页',
icon: 'user',
path: 'user-profile',
path: 'account',
children: [{
name: '个人中心',
path: 'user-center',
path: 'center',
}, {
name: '个人设置',
path: 'userinfo/base',
path: 'settings',
}],
}];
......
......@@ -163,23 +163,23 @@ export const getRouterData = (app) => {
'/user/register-result': {
component: dynamicWrapper(app, [], () => import('../routes/User/RegisterResult')),
},
'/user-profile/user-center': {
component: dynamicWrapper(app, ['list', 'user', 'project'], () => import('../routes/UserProfile/UserCenter')),
'/account/center': {
component: dynamicWrapper(app, ['list', 'user', 'project'], () => import('../routes/Account/Center')),
},
'/user-profile/userinfo': {
component: dynamicWrapper(app, ['geographic'], () => import('../routes/UserProfile/Userinfo/Info')),
'/account/settings': {
component: dynamicWrapper(app, ['geographic'], () => import('../routes/Account/Settings/Info')),
},
'/user-profile/userinfo/base': {
component: dynamicWrapper(app, ['geographic'], () => import('../routes/UserProfile/Userinfo/BaseView')),
'/account/settings/base': {
component: dynamicWrapper(app, ['geographic'], () => import('../routes/Account/Settings/BaseView')),
},
'/user-profile/userinfo/safe': {
component: dynamicWrapper(app, ['geographic'], () => import('../routes/UserProfile/Userinfo/SafeView')),
'/account/settings/security': {
component: dynamicWrapper(app, ['geographic'], () => import('../routes/Account/Settings/SecurityView')),
},
'/user-profile/userinfo/account': {
component: dynamicWrapper(app, ['geographic'], () => import('../routes/UserProfile/Userinfo/AccountView')),
'/account/settings/binding': {
component: dynamicWrapper(app, ['geographic'], () => import('../routes/Account/Settings/BindingView')),
},
'/user-profile/userinfo/message': {
component: dynamicWrapper(app, ['geographic'], () => import('../routes/UserProfile/Userinfo/MessageView')),
'/account/settings/notification': {
component: dynamicWrapper(app, ['geographic'], () => import('../routes/Account/Settings/NotificationView')),
},
// '/user/:id': {
// component: dynamicWrapper(app, [], () => import('../routes/User/SomeComponent')),
......
......@@ -20,8 +20,8 @@ import {
} from 'antd';
import AvatarList from '../../components/AvatarList';
import { formatWan } from '../../utils/utils';
import styles from './UserCenter.less';
import stylesProjects from '../List/Projects.less';
import styles from './Center.less';
import stylesArticles from '../List/Articles.less';
import stylesApplications from '../List/Applications.less';
import GridContent from '../../layouts/GridContent';
......@@ -34,7 +34,7 @@ import GridContent from '../../layouts/GridContent';
project,
projectLoading: loading.effects['project/fetchNotice'],
}))
export default class UserCenter extends PureComponent {
export default class Center extends PureComponent {
state = {
key: 'article',
newTags: [],
......
import React, { Component, Fragment } from 'react';
import { Icon, List } from 'antd';
export default class AccountView extends Component {
export default class BindingView extends Component {
getData = () => {
return [
{
......
......@@ -10,9 +10,9 @@ const { Item } = Menu;
const menuMap = {
base: '基本设置',
safe: '安全设置',
account: '账号绑定',
message: '新消息通知',
security: '安全设置',
binding: '账号绑定',
notification: '新消息通知',
};
@connect(({ user }) => ({
......@@ -45,7 +45,7 @@ export default class Info extends Component {
return menuMap[this.state.selectKey];
};
selectKey = ({ key }) => {
this.props.dispatch(routerRedux.push(`/user-profile/userinfo/${key}`));
this.props.dispatch(routerRedux.push(`/account/settings/${key}`));
this.setState({
selectKey: key,
});
......@@ -101,7 +101,11 @@ export default class Info extends Component {
exact={item.exact}
/>
))}
<Redirect exact from="/userinfo" to="/userinfo/base" />
<Redirect
exact
from="/account/settings"
to="/account/settings/base"
/>
<Redirect to="/exception/404" />
</Switch>
</div>
......
......@@ -3,7 +3,7 @@ import { Switch, List } from 'antd';
const Action = <Switch checkedChildren="" unCheckedChildren="" defaultChecked />;
export default class MessageView extends Component {
export default class NotificationView extends Component {
getData = () => {
return [
{
......
......@@ -7,7 +7,7 @@ const passwordStrength = {
weak: <font className="weak"></font>,
};
export default class SafeView extends Component {
export default class SecurityView extends Component {
getData = () => {
return [
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment