From db1a1f4836e87d321fef6ad7673387cac288b2bc Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Thu, 21 Dec 2023 22:29:35 +0800 Subject: [PATCH] yh --- public/account.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/account.html b/public/account.html index ec96b48..aaa5e70 100644 --- a/public/account.html +++ b/public/account.html @@ -13,7 +13,7 @@ - {{username}} + {{username}} 退出登录 @@ -81,6 +81,10 @@ } }, methods: { + logout() { + indow.sessionStorage.removeItem('token'); + window.location.href = '/login.html'; + }, getUserInfo() { axios.post('/account/user-info', {token: window.sessionStorage.getItem('token')}) .then( (response) => {