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
P
pro-blocks
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
pro-blocks
Commits
e7a78e7d
Commit
e7a78e7d
authored
Jul 12, 2018
by
陈帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: fix trigger error
parent
b1ef8d42
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
112 deletions
+16
-112
config/config.js
config/config.js
+0
-9
src/common/menu.js
src/common/menu.js
+0
-20
src/components/SettingDarwer/index.js
src/components/SettingDarwer/index.js
+14
-13
src/components/SettingDarwer/index.less
src/components/SettingDarwer/index.less
+0
-8
src/global.js
src/global.js
+0
-30
src/models/error.js
src/models/error.js
+0
-3
src/pages/User/Login.js
src/pages/User/Login.js
+0
-2
src/pages/layouts/BasicLayout.js
src/pages/layouts/BasicLayout.js
+0
-1
src/pages/layouts/UserLayout.js
src/pages/layouts/UserLayout.js
+2
-26
No files found.
config/config.js
View file @
e7a78e7d
...
...
@@ -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,
...
...
src/common/menu.js
View file @
e7a78e7d
...
...
@@ -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
'
,
...
...
src/components/SettingDarwer/index.js
View file @
e7a78e7d
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
}
>
<
div
className
=
{
styles
.
content
}
>
<
CopyToClipboard
text
=
{
JSON
.
stringify
(
setting
)}
onCopy
=
{()
=>
message
.
success
(
'
copy success
'
)}
>
<
div
className
=
{
styles
.
clipboard
}
>
<
img
src
=
"
https://gw.alipayobjects.com/zos/rmsportal/YuWymXLusbplhCwgZwMT.svg
"
alt
=
"
Copy To Clipboard
"
width
=
{
18
}
/
>
<
/div
>
<
/CopyToClipboard
>
<
Body
title
=
"
整体风格设置
"
>
<
BlockChecbox
list
=
{[
...
...
@@ -255,6 +243,19 @@ class SettingDarwer extends PureComponent {
色弱模式
<
/List.Item
>
<
/Body
>
<
Divider
/>
<
CopyToClipboard
text
=
{
JSON
.
stringify
(
setting
)}
onCopy
=
{()
=>
message
.
success
(
'
copy success
'
)}
>
<
Button
style
=
{{
width
:
224
,
}}
>
<
Icon
type
=
"
copy
"
/>
拷贝代码
<
/Button
>
<
/CopyToClipboard
>
<
/div
>
<
/DrawerMenu
>
);
...
...
src/components/SettingDarwer/index.less
View file @
e7a78e7d
...
...
@@ -6,14 +6,6 @@
padding: 24px;
background: #fff;
position: relative;
.clipboard {
position: absolute;
top: 10px;
right: 10px;
cursor: pointer;
width: 16px;
height: 16px;
}
}
.blockChecbox {
...
...
src/global.js
View file @
e7a78e7d
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
src/models/error.js
View file @
e7a78e7d
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
,
...
...
src/pages/User/Login.js
View file @
e7a78e7d
...
...
@@ -59,8 +59,6 @@ export default class LoginPage extends Component {
});
};
loginForm
;
renderMessage
=
content
=>
{
return
<
Alert
style
=
{{
marginBottom
:
24
}}
message
=
{
content
}
type
=
"
error
"
showIcon
/>
;
};
...
...
src/pages/layouts/BasicLayout.js
View file @
e7a78e7d
...
...
@@ -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
=>
{
...
...
src/pages/layouts/UserLayout.js
View file @
e7a78e7d
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
<
Icon
type
=
"
copyright
"
/>
2018
蚂蚁金服体验技术部出品
<
/Fragment
>
);
// 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 <DocumentTitle title={this.getPageTitle()}>
//
@
TODO <DocumentTitle title={this.getPageTitle()}>
<
div
className
=
{
styles
.
container
}
>
<
div
className
=
{
styles
.
content
}
>
<
div
className
=
{
styles
.
top
}
>
...
...
@@ -69,21 +57,9 @@ class UserLayout extends React.PureComponent {
<
div
className
=
{
styles
.
desc
}
>
Ant
Design
是西湖区最具影响力的
Web
设计规范
<
/div
>
<
/div
>
{
children
}
{
/* <Switch>
{getRoutes(match.path, routerData).map(item => (
<Route
key={item.key}
path={item.path}
component={item.component}
exact={item.exact}
/>
))}
<Redirect from="/user" to={getLoginPathWithRedirectPath()} />
</Switch> */
}
<
/div
>
<
GlobalFooter
links
=
{
links
}
copyright
=
{
copyright
}
/
>
<
/div
>
// </DocumentTitle>
);
}
}
...
...
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