From 0c7ec81a3a9d1fc9ea06dcb6db168a3820fc5265 Mon Sep 17 00:00:00 2001 From: megavrilinvv Date: Tue, 8 Nov 2022 15:31:26 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=89=D0=B8=D1=82=D1=81=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BB=D0=B5=D0=B9=20=D0=BF=D1=80=D0=B8=20=D0=BD?= =?UTF-8?q?=D0=B5=D0=B2=D0=B5=D1=80=D0=BD=D0=BE=D0=BC=20=D0=BB=D0=BE=D0=B3?= =?UTF-8?q?=D0=B8=D0=BD=D0=B5=20=D0=B8=D0=BB=D0=B8=20=D0=BF=D0=B0=D1=80?= =?UTF-8?q?=D0=BE=D0=BB=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/login/TheLogin.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/login/TheLogin.vue b/src/pages/login/TheLogin.vue index 37df0e2..0c753a4 100644 --- a/src/pages/login/TheLogin.vue +++ b/src/pages/login/TheLogin.vue @@ -72,7 +72,6 @@ export default { changeView() { this.isView = !this.isView; }, - persist() { localStorage.username = this.user.username; localStorage.password = this.user.password; @@ -88,7 +87,11 @@ export default { if (result.status === 200) { return result.json(); } else { - return (this.authorized = false); + this.authorized = false; + if (!this.authorized) { + this.user.username = ""; + this.user.password = ""; + } } }) .then((token) => { @@ -101,7 +104,6 @@ export default { }); }, }, - mounted() { if (localStorage.username) this.user.username = localStorage.username; if (localStorage.password) this.user.password = localStorage.password;