Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
hrs_app_h5
/
bill
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2d46a836
authored
May 09, 2020
by
展昭
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
interceptors
parent
a081d73b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
src/api/http.js
src/store/index.js
src/api/http.js
View file @
2d46a836
...
...
@@ -40,7 +40,6 @@ http.interceptors.response.use(
},
(
error
)
=>
{
Toast
.
clear
();
console
.
log
(
'error='
,
error
);
let
info
=
{};
let
{
status
}
=
error
.
response
;
info
=
{
...
...
@@ -49,7 +48,9 @@ http.interceptors.response.use(
msg
:
"系统出现未知错误"
};
console
.
log
(
info
);
return
info
;
Toast
.
fail
(
'授权失败!'
,
0
);
//return info;
}
);
...
...
src/store/index.js
View file @
2d46a836
...
...
@@ -34,6 +34,8 @@ async function getToken(access_token, appid) {
if
(
res
.
status
==
200
)
{
const
accessToken
=
res
.
data
.
access_token
;
localStorage
.
setItem
(
"token"
,
accessToken
);
}
else
{
console
.
log
(
'res='
,
res
);
}
},
err
=>
{
...
...
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