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
3b8d86d6
authored
May 06, 2020
by
展昭
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
71241a28
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
6 deletions
src/api/index.js
src/store/index.js
src/views/OidcCallback.vue
src/api/index.js
View file @
3b8d86d6
...
...
@@ -58,7 +58,6 @@ const api = {
function
defineHeader
()
{
//const token = store.state.oidc.access_token;
const
token
=
store
.
getters
.
getToken
;
console
.
log
(
'token='
,
token
);
headers
.
Authorization
=
"Bearer "
+
token
;
return
Promise
.
resolve
(
headers
);
}
...
...
src/store/index.js
View file @
3b8d86d6
...
...
@@ -60,9 +60,7 @@ export default new Vuex.Store({
userLoaded
:
async
(
user
)
=>
{
// console.log("userLoaded=>", user);
const
appid
=
localStorage
.
getItem
(
'appid'
);
console
.
log
(
'appid='
,
appid
);
await
getToken
(
user
.
access_token
,
appid
);
console
.
log
(
'appid2222222='
,
appid
);
}
})
}
...
...
src/views/OidcCallback.vue
View file @
3b8d86d6
...
...
@@ -54,10 +54,10 @@ export default {
mounted
()
{
this
.
oidcSignInCallback
()
.
then
(
redirectPath
=>
{
this
.
getOidcUser
(
user
=>
{
this
.
getOidcUser
().
then
(
user
=>
{
const
appid
=
localStorage
.
getItem
(
"appid"
);
this
.
getToken
(
user
.
access_token
,
appid
,
redirectPath
);
});
this
.
$router
.
push
(
redirectPath
);
})
.
catch
(
err
=>
{
console
.
error
(
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