From bd692901a0c829379418d342f85e435a24363e8a Mon Sep 17 00:00:00 2001 From: zlt Date: Tue, 10 Mar 2020 23:35:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96back-web=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E7=9A=84=E7=99=BB=E5=87=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/module/index.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/zlt-web/back-web/src/main/resources/static/module/index.js b/zlt-web/back-web/src/main/resources/static/module/index.js index 1637c09..37b97cc 100644 --- a/zlt-web/back-web/src/main/resources/static/module/index.js +++ b/zlt-web/back-web/src/main/resources/static/module/index.js @@ -213,11 +213,13 @@ layui.define(['config', 'admin', 'layer', 'laytpl', 'element', 'form'], function // 退出登录 $('#btnLogout').click(function () { layer.confirm('确定退出登录?', function () { - //通过认证中心 tuic - admin.req('api-uaa/oauth/remove/token', {}, function (data) { - config.removeToken(); - location.replace('login.html'); - }, 'POST'); + let token = config.getToken(); + let accessToken; + if (token) { + accessToken = token.access_token; + } + config.removeToken(); + window.location = config.base_server + 'api-uaa/oauth/remove/token?redirectUri=http://127.0.0.1:8066/login.html&access_token='+accessToken; }); }); // 修改密码 -- GitLab