Commit c067222d by 展昭

err

parent c9a0773f
...@@ -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()
} }
} }
......
...@@ -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;
}); });
} }
......
...@@ -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("123res=", 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,10 +63,6 @@ export default { ...@@ -65,10 +63,6 @@ export default {
} }
}, },
mounted() { mounted() {
const err = this.$route.query.err;
if (err) {
this.errMessage = err;
} else {
this.oidcSignInCallback() this.oidcSignInCallback()
.then(redirectPath => { .then(redirectPath => {
this.getOidcUser().then(user => { this.getOidcUser().then(user => {
...@@ -81,7 +75,6 @@ export default { ...@@ -81,7 +75,6 @@ export default {
//this.$router.push("/oidc-callback-error"); // Handle errors any way you want //this.$router.push("/oidc-callback-error"); // Handle errors any way you want
}); });
} }
}
}; };
</script> </script>
......
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