From a55999220c8d83a03c6e87f080bfdc905edcbc61 Mon Sep 17 00:00:00 2001 From: zsen hu Date: Fri, 12 Nov 2021 14:17:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E9=80=80=E5=87=BA=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E7=99=BB=E5=BD=95=E5=85=B6=E5=AE=83=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E9=87=8D=E7=BD=AEtoken?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index b831a7d..bb45326 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -3,7 +3,7 @@ * @version: * @Date: 2021-04-20 11:06:21 * @LastEditors: huzhushan@126.com - * @LastEditTime: 2021-07-19 09:58:03 + * @LastEditTime: 2021-11-12 11:28:20 * @Author: huzhushan@126.com * @HomePage: https://huzhushan.gitee.io/vue3-element-admin * @Github: https://github.com/huzhushan/vue3-element-admin @@ -112,6 +112,9 @@ export default defineComponent({ } else { router.push('/') } + if (store.state.app.authorization) { + store.dispatch('app/clearToken') + } store.commit('app/setToken', data) } else { ctx.$message.error(message)