diff --git a/src/components/common/the-header.vue b/src/components/common/the-header.vue index 71caaf4..2e51e15 100644 --- a/src/components/common/the-header.vue +++ b/src/components/common/the-header.vue @@ -46,8 +46,7 @@ export default { url: "/app/userCenter", method: "GET" }).then(res => { - // res.url = "http://localhost:8081"; - window.open(res.url + "?action=logout", "_self"); + window.open(res.data.url + "?action=logout", "_self"); }); } } diff --git a/src/plugins/axios/axios.js b/src/plugins/axios/axios.js index fce4b94..8cfebab 100644 --- a/src/plugins/axios/axios.js +++ b/src/plugins/axios/axios.js @@ -39,7 +39,7 @@ instance.interceptors.response.use((response) => { url: '/app/userCenter', method: 'GET' }).then(res => { - window.open(res.url + '?redirect=' + location.origin, '_self') + window.open(res.data.url + '?redirect=' + location.origin, '_self') }) } ++window.once diff --git a/src/views/center.vue b/src/views/center.vue index 74a50a5..3bd9325 100644 --- a/src/views/center.vue +++ b/src/views/center.vue @@ -43,7 +43,7 @@ export default { }).then(res => { // res.url = "http://localhost:8080"; window.open( - res.url + "?redirect=" + location.origin + "#/center", + res.data.url + "?redirect=" + location.origin + "#/center", "_self" ); });