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) => {