Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
front-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
front-backend
Commits
c69c80d4
Commit
c69c80d4
authored
Apr 18, 2019
by
zhengjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.7 优化
parent
ea183f38
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
src/styles/index.scss
+1
-1
src/utils/request.js
+9
-2
No files found.
src/styles/index.scss
View file @
c69c80d4
...
...
@@ -132,6 +132,6 @@ a:hover {
height
:
32px
;
width
:
135px
;
display
:
block
;
margin
:
0
auto
;
//
margin: 0 auto;
}
}
src/utils/request.js
View file @
c69c80d4
...
...
@@ -45,9 +45,16 @@ service.interceptors.response.use(
try
{
code
=
error
.
response
.
data
.
status
}
catch
(
e
)
{
if
(
error
.
toString
().
indexOf
(
'
timeout'
)
)
{
if
(
error
.
toString
().
indexOf
(
'
Error: timeout'
)
!==
-
1
)
{
Notification
.
error
({
title
:
'请求超时'
,
title
:
'请求超时,请重试'
,
duration
:
2500
})
return
Promise
.
reject
(
error
)
}
if
(
error
.
toString
().
indexOf
(
'Error: Network Error'
)
!==
-
1
)
{
Notification
.
error
({
title
:
'网络错误,请联系网站管理员恢复'
,
duration
:
2500
})
return
Promise
.
reject
(
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