Commit 3b8d86d6 by 展昭

update

parent 71241a28
......@@ -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);
}
......
......@@ -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);
}
})
}
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment