Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
frontend
/
qqxb-self-service
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
7a0cbf32
authored
Jun 18, 2020
by
cocomilk2012
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
2cdb23ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
src/router/index.ts
src/router/index.ts
View file @
7a0cbf32
...
@@ -68,6 +68,8 @@ function getAccessToken(authcode) {
...
@@ -68,6 +68,8 @@ function getAccessToken(authcode) {
};
};
axios
.
post
(
url
,
qs
.
stringify
(
pms
)).
then
((
res
)
=>
{
axios
.
post
(
url
,
qs
.
stringify
(
pms
)).
then
((
res
)
=>
{
if
(
res
&&
res
.
status
)
{
if
(
res
&&
res
.
status
)
{
console
.
log
(
'res.data.access_token'
,
res
.
data
.
access_token
);
const
accessToken
=
res
.
data
.
access_token
;
const
accessToken
=
res
.
data
.
access_token
;
resolve
(
accessToken
);
resolve
(
accessToken
);
}
else
{
}
else
{
...
@@ -108,7 +110,7 @@ router.beforeEach((to, from, next) => {
...
@@ -108,7 +110,7 @@ router.beforeEach((to, from, next) => {
if
(
!!
authcode
)
{
if
(
!!
authcode
)
{
getAccessToken
(
authcode
)
getAccessToken
(
authcode
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
const
redirectPath
=
getPathByTo
(
to
,
'auth
c
ode'
);
const
redirectPath
=
getPathByTo
(
to
,
'auth
C
ode'
);
console
.
log
(
'redirectPath='
,
redirectPath
);
console
.
log
(
'redirectPath='
,
redirectPath
);
//@ts-ignore
//@ts-ignore
const
accessToken
:
string
=
res
;
const
accessToken
:
string
=
res
;
...
...
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