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
29b66689
authored
May 09, 2020
by
展昭
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
err page = call back page
parent
aa40f9fb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
src/store/index.js
src/views/OidcCallback.vue
src/store/index.js
View file @
29b66689
...
...
@@ -38,11 +38,19 @@ async function getToken(access_token, appid) {
},
err
=>
{
console
.
log
(
"789err="
,
err
);
this
.
$router
.
push
({
name
:
"oidcCallback"
,
query
:
{
err
:
err
.
response
.
data
.
error_description
}
});
}
)
.
catch
(
err
=>
{
console
.
log
(
"111err="
,
err
);
//this.$router.push("/oidc-callback-error"); // Handle errors any way you want
this
.
$router
.
push
({
name
:
"oidcCallback"
,
query
:
{
err
:
err
.
response
.
data
.
error_description
}
});
});
}
...
...
src/views/OidcCallback.vue
View file @
29b66689
...
...
@@ -46,7 +46,6 @@ export default {
res
=>
{
console
.
log
(
"res="
,
res
);
if
(
res
.
status
==
200
)
{
const
accessToken
=
res
.
data
.
access_token
;
//store.dispatch("changeToken", accessToken);
localStorage
.
setItem
(
"token"
,
accessToken
);
...
...
@@ -56,7 +55,7 @@ export default {
err
=>
{
console
.
log
(
"123err="
,
err
);
this
.
errMessage
=
err
.
response
.
data
.
error_description
;
console
.
log
(
'this.errMessage='
,
this
.
errMessage
);
console
.
log
(
"this.errMessage="
,
this
.
errMessage
);
}
)
.
catch
(
err
=>
{
...
...
@@ -66,6 +65,10 @@ export default {
}
},
mounted
()
{
const
err
=
this
.
$route
.
query
.
err
;
if
(
err
)
{
this
.
errMessage
=
err
;
}
else
{
this
.
oidcSignInCallback
()
.
then
(
redirectPath
=>
{
this
.
getOidcUser
().
then
(
user
=>
{
...
...
@@ -78,6 +81,7 @@ export default {
//this.$router.push("/oidc-callback-error"); // Handle errors any way you want
});
}
}
};
</
script
>
...
...
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