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
6470e034
Commit
6470e034
authored
Sep 18, 2017
by
nikogu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
close:
https://github.com/ant-design/test2/issues/11
parent
558da10f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
src/components/GlobalFooter/index.less
src/components/GlobalFooter/index.less
+2
-1
src/utils/request.js
src/utils/request.js
+18
-3
No files found.
src/components/GlobalFooter/index.less
View file @
6470e034
@import "~antd/lib/style/themes/default.less";
.globalFooter {
margin: 32px 28px 16px;
padding: 16px;
margin: 32px 0 16px 0;
text-align: center;
.links {
...
...
src/utils/request.js
View file @
6470e034
import
fetch
from
'
dva/fetch
'
;
import
{
notification
}
from
'
antd
'
;
function
checkStatus
(
response
)
{
if
(
response
.
status
>=
200
&&
response
.
status
<
300
)
{
return
response
;
}
const
error
=
new
Error
(
response
.
statusText
);
error
.
response
=
response
;
throw
error
;
return
response
.
json
().
then
((
result
)
=>
{
if
(
result
.
code
)
{
notification
.
error
({
message
:
result
.
name
,
description
:
result
.
message
,
});
}
if
(
result
.
stack
)
{
notification
.
error
({
message
:
'
请求错误
'
,
description
:
result
.
message
,
});
}
const
error
=
new
Error
(
result
.
message
);
error
.
response
=
response
;
throw
error
;
});
}
/**
...
...
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