diff --git a/config/config.js b/config/config.js index 2c46f30e11fbe094e3a51d42efa888c053c1f3bc..e7c3f19423e6378fe0f5d68dbdd6791e081c2399 100644 --- a/config/config.js +++ b/config/config.js @@ -41,7 +41,6 @@ export default { { path: '/user/register-result', component: './User/RegisterResult' }, ], }, - // app { path: '/', @@ -125,14 +124,10 @@ export default { }, ], - // https://github.com/ant-design/ant-design/blob/master/components/style/themes/default.less theme: { - // 'primary-color': '#10e99b', 'card-actions-background': '#f5f8fa', }, - // copy from old webpackrc.js - // entry: 'src/index.js', // TODO remove extraBabelPlugins: [['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }]], env: { @@ -152,10 +147,6 @@ export default { common: path.resolve(__dirname, '../src/common/'), }, ignoreMomentLocale: true, - // theme: './theme.js', - // html: { TODO remove - // template: './index.ejs', - // }, publicPath: '/', // TODO check hash config // hash: true, diff --git a/src/common/menu.js b/src/common/menu.js index 1b25572800cf4fa86bb8dcbd1ab37e35563a3f3b..35af176a121c60516780edafac42329470de8fdb 100644 --- a/src/common/menu.js +++ b/src/common/menu.js @@ -330,26 +330,6 @@ const menuData = [ }, ], }, - { - name: 'user', - icon: 'user', - path: 'User', - authority: 'guest', - children: [ - { - name: 'login', - path: 'login', - }, - { - name: 'register', - path: 'register', - }, - { - name: 'register-result', - path: 'register-result', - }, - ], - }, { name: 'account', icon: 'user', diff --git a/src/components/SettingDarwer/index.js b/src/components/SettingDarwer/index.js index 6f2b76d9122cd6f305647e3a222936d9d5b976a2..4124cdd90825edf05b327531064551ce34a57092 100644 --- a/src/components/SettingDarwer/index.js +++ b/src/components/SettingDarwer/index.js @@ -1,5 +1,5 @@ import React, { PureComponent } from 'react'; -import { Select, message, List, Switch, Divider, Icon } from 'antd'; +import { Select, message, List, Switch, Divider, Icon, Button } from 'antd'; import DrawerMenu from 'rc-drawer'; import { CopyToClipboard } from 'react-copy-to-clipboard'; import { connect } from 'dva'; @@ -184,18 +184,6 @@ class SettingDarwer extends PureComponent { onMaskClick={this.togglerContent} >
- message.success('copy success')} - > -
- Copy To Clipboard -
-
+ + message.success('copy success')} + > + +
); diff --git a/src/components/SettingDarwer/index.less b/src/components/SettingDarwer/index.less index 4a21f99920ea508d09d62a6d0168f66378b2511e..39db72a6d750c1596301eee6ca7c23831af7506c 100644 --- a/src/components/SettingDarwer/index.less +++ b/src/components/SettingDarwer/index.less @@ -6,14 +6,6 @@ padding: 24px; background: #fff; position: relative; - .clipboard { - position: absolute; - top: 10px; - right: 10px; - cursor: pointer; - width: 16px; - height: 16px; - } } .blockChecbox { diff --git a/src/global.js b/src/global.js index 21b0b4a6f41a0deb2fee075f1a1785686759f144..2100827dfb735ce3b96b8b91e8ebeca35d63cd42 100644 --- a/src/global.js +++ b/src/global.js @@ -1,31 +1 @@ import './polyfill'; - -// TODO remove -// import dva from 'dva'; - -// import createHistory from 'history/createHashHistory'; -// // user BrowserHistory -// // import createHistory from 'history/createBrowserHistory'; -// import createLoading from 'dva-loading'; -// import 'moment/locale/zh-cn'; -// import './rollbar'; - -// import './index.less'; -// // 1. Initialize -// const app = dva({ -// history: createHistory(), -// }); - -// // 2. Plugins -// app.use(createLoading()); - -// // 3. Register global model -// app.model(require('./models/global').default); - -// // 4. Router -// app.router(require('./router').default); - -// // 5. Start -// app.start('#root'); - -// export default app._store; // eslint-disable-line diff --git a/src/models/error.js b/src/models/error.js index 01431f4cd0839683cb252ae2ec35995a4d88a5c6..d74d1bfc64e14819ab63a1086f17af6227e2793c 100644 --- a/src/models/error.js +++ b/src/models/error.js @@ -1,4 +1,3 @@ -import { routerRedux } from 'dva/router'; import { query } from '../services/error'; export default { @@ -12,8 +11,6 @@ export default { effects: { *query({ payload }, { call, put }) { yield call(query, payload.code); - // redirect on client when network broken - yield put(routerRedux.push(`/exception/${payload.code}`)); yield put({ type: 'trigger', payload: payload.code, diff --git a/src/pages/User/Login.js b/src/pages/User/Login.js index 25caea1ae32ad4765b4df59a800a3bc2aca74732..a88a5ae4c517b64e8847686dd9e641136a3850ff 100644 --- a/src/pages/User/Login.js +++ b/src/pages/User/Login.js @@ -59,8 +59,6 @@ export default class LoginPage extends Component { }); }; - loginForm; - renderMessage = content => { return ; }; diff --git a/src/pages/layouts/BasicLayout.js b/src/pages/layouts/BasicLayout.js index 341621840d0d2c3fd273af2af716cfa0fbe189b8..3456ffc72f4bf957ea22a7b0e1d621935a84679e 100644 --- a/src/pages/layouts/BasicLayout.js +++ b/src/pages/layouts/BasicLayout.js @@ -29,7 +29,6 @@ const { check } = Authorized; * @param {Object} routerData 路由配置 */ const getBreadcrumbNameMap = memoizeOne((meun, router) => { - console.log(meun, router); const routerMap = {}; const mergeMeunAndRouter = meunData => { meunData.forEach(meunItem => { diff --git a/src/pages/layouts/UserLayout.js b/src/pages/layouts/UserLayout.js index 034cbf84f2260aba1672139f213550664abde94e..f281d11db45a0e5dd45365d461614233641f0e35 100644 --- a/src/pages/layouts/UserLayout.js +++ b/src/pages/layouts/UserLayout.js @@ -1,14 +1,10 @@ import React, { Fragment } from 'react'; import { Link } from 'dva/router'; -// import DocumentTitle from 'react-document-title'; import { Icon } from 'antd'; import GlobalFooter from '../../components/GlobalFooter'; import styles from './UserLayout.less'; import logo from '../../assets/logo.svg'; -// TODO:remove -// import { getRoutes, getPageQuery, getQueryPath } from '../utils/utils'; - const links = [ { key: 'help', @@ -32,17 +28,9 @@ const copyright = ( Copyright 2018 蚂蚁金服体验技术部出品 ); -// TODO:remove -// function getLoginPathWithRedirectPath() { -// const params = getPageQuery(); -// const { redirect } = params; -// return getQueryPath('/user/login', { -// redirect, -// }); -// } class UserLayout extends React.PureComponent { - // TODO title + // @TODO title // getPageTitle() { // const { routerData, location } = this.props; // const { pathname } = location; @@ -56,7 +44,7 @@ class UserLayout extends React.PureComponent { render() { const { children } = this.props; return ( - // TODO + // @TODO
@@ -69,21 +57,9 @@ class UserLayout extends React.PureComponent {
Ant Design 是西湖区最具影响力的 Web 设计规范
{children} - {/* - {getRoutes(match.path, routerData).map(item => ( - - ))} - - */}
- //
); } }