From cd657cc1bd938451f7a14b72186cde91577517f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=B4=87=E6=A0=8B?= <786631302qq.com> Date: Wed, 26 Aug 2020 11:12:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=B8=AD=E5=BF=83=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E8=BF=94=E5=9B=9E=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/the-header.vue | 3 +-- src/plugins/axios/axios.js | 2 +- src/views/center.vue | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) 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" ); });