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
c067222d
authored
May 09, 2020
by
展昭
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
err
parent
c9a0773f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
22 deletions
src/router/index.js
src/store/index.js
src/views/OidcCallback.vue
src/router/index.js
View file @
c067222d
...
@@ -90,10 +90,6 @@ router.beforeEach((to, from, next) => {
...
@@ -90,10 +90,6 @@ router.beforeEach((to, from, next) => {
setAutoLogin
({
autoCode
:
authcode
,
redirectPath
:
toPath
})
setAutoLogin
({
autoCode
:
authcode
,
redirectPath
:
toPath
})
store
.
dispatch
(
"signOutOidc"
)
store
.
dispatch
(
"signOutOidc"
)
}
else
{
}
else
{
console
.
log
(
'abc'
);
console
.
log
(
'to='
,
to
);
console
.
log
(
'from='
,
from
);
next
()
next
()
}
}
}
}
...
...
src/store/index.js
View file @
c067222d
...
@@ -42,6 +42,7 @@ async function getToken(access_token, appid) {
...
@@ -42,6 +42,7 @@ async function getToken(access_token, appid) {
)
)
.
catch
(
err
=>
{
.
catch
(
err
=>
{
console
.
log
(
"111err="
,
err
);
console
.
log
(
"111err="
,
err
);
window
.
location
.
href
=
'/callback.html?err='
+
err
.
response
.
data
.
error_description
;
});
});
}
}
...
...
src/views/OidcCallback.vue
View file @
c067222d
...
@@ -44,7 +44,7 @@ export default {
...
@@ -44,7 +44,7 @@ export default {
.
post
(
url
,
qs
.
stringify
(
pms
))
.
post
(
url
,
qs
.
stringify
(
pms
))
.
then
(
.
then
(
res
=>
{
res
=>
{
console
.
log
(
"res="
,
res
);
console
.
log
(
"
123
res="
,
res
);
if
(
res
.
status
==
200
)
{
if
(
res
.
status
==
200
)
{
const
accessToken
=
res
.
data
.
access_token
;
const
accessToken
=
res
.
data
.
access_token
;
//store.dispatch("changeToken", accessToken);
//store.dispatch("changeToken", accessToken);
...
@@ -53,9 +53,7 @@ export default {
...
@@ -53,9 +53,7 @@ export default {
}
}
},
},
err
=>
{
err
=>
{
console
.
log
(
"123err="
,
err
);
this
.
errMessage
=
err
.
response
.
data
.
error_description
;
this
.
errMessage
=
err
.
response
.
data
.
error_description
;
console
.
log
(
"this.errMessage="
,
this
.
errMessage
);
}
}
)
)
.
catch
(
err
=>
{
.
catch
(
err
=>
{
...
@@ -65,22 +63,17 @@ export default {
...
@@ -65,22 +63,17 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
const
err
=
this
.
$route
.
query
.
err
;
this
.
oidcSignInCallback
()
if
(
err
)
{
.
then
(
redirectPath
=>
{
this
.
errMessage
=
err
;
this
.
getOidcUser
().
then
(
user
=>
{
}
else
{
const
appid
=
localStorage
.
getItem
(
"appid"
);
this
.
oidcSignInCallback
()
this
.
getToken
(
user
.
access_token
,
appid
,
redirectPath
);
.
then
(
redirectPath
=>
{
this
.
getOidcUser
().
then
(
user
=>
{
const
appid
=
localStorage
.
getItem
(
"appid"
);
this
.
getToken
(
user
.
access_token
,
appid
,
redirectPath
);
});
})
.
catch
(
err
=>
{
console
.
error
(
err
);
//this.$router.push("/oidc-callback-error"); // Handle errors any way you want
});
});
}
})
.
catch
(
err
=>
{
console
.
error
(
err
);
//this.$router.push("/oidc-callback-error"); // Handle errors any way you want
});
}
}
};
};
</
script
>
</
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