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
2230ae50
authored
Jun 16, 2020
by
展昭
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
c00bfb1f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
src/router/index.js
src/router/index.js
View file @
2230ae50
...
@@ -79,7 +79,8 @@ async function getToken(access_token, appid, redirectPath) {
...
@@ -79,7 +79,8 @@ async function getToken(access_token, appid, redirectPath) {
if
(
res
.
status
==
200
)
{
if
(
res
.
status
==
200
)
{
const
accessToken
=
res
.
data
.
access_token
;
const
accessToken
=
res
.
data
.
access_token
;
localStorage
.
setItem
(
"token"
,
accessToken
);
localStorage
.
setItem
(
"token"
,
accessToken
);
this
.
$router
.
push
(
redirectPath
);
console
.
log
(
'redirectPath='
,
redirectPath
);
window
.
location
.
href
=
redirectPath
;
}
}
},
},
err
=>
{
err
=>
{
...
@@ -100,9 +101,7 @@ function getPathByTo(to, authcode_key) {
...
@@ -100,9 +101,7 @@ function getPathByTo(to, authcode_key) {
toPath
+=
toPath
.
indexOf
(
"?"
)
>
-
1
?
"&"
:
"?"
;
toPath
+=
toPath
.
indexOf
(
"?"
)
>
-
1
?
"&"
:
"?"
;
toPath
+=
`
${
key
}
=
${
to
.
query
[
key
]}
`
;
toPath
+=
`
${
key
}
=
${
to
.
query
[
key
]}
`
;
}
}
toPath
=
toPath
.
indexOf
(
'?'
)
>
-
1
?
toPath
+
"&t="
+
(
new
Date
()).
valueOf
()
:
toPath
+
"?t="
+
(
new
Date
()).
valueOf
();
toPath
=
toPath
.
indexOf
(
'?'
)
>
-
1
?
toPath
+
"&t="
+
(
new
Date
()).
valueOf
()
:
toPath
+
"?t="
+
(
new
Date
()).
valueOf
();
return
toPath
;
return
toPath
;
}
}
...
@@ -118,7 +117,6 @@ router.beforeEach((to, from, next) => {
...
@@ -118,7 +117,6 @@ router.beforeEach((to, from, next) => {
console
.
log
(
'err='
,
err
);
console
.
log
(
'err='
,
err
);
})
})
}
else
{
}
else
{
next
()
next
()
}
}
...
...
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