From 6f6e2d5200d255aaf3919292c65d3ff133eb8b4d Mon Sep 17 00:00:00 2001 From: zrh050423 <14331304+zrh050423@user.noreply.gitee.com> Date: Sat, 21 Dec 2024 14:02:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=B4=E9=83=A8=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Header.vue | 6 ++---- src/views/consultation/Record.vue | 36 ++++++++++++++----------------- src/views/login/Index.vue | 3 +++ 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/components/Header.vue b/src/components/Header.vue index 12f940e..4ea2a8f 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -11,7 +11,7 @@ - {{ userInfo.name }} + {{ userInfo.username }} - - + diff --git a/src/views/login/Index.vue b/src/views/login/Index.vue index 5fc8e9e..3a5d0a0 100644 --- a/src/views/login/Index.vue +++ b/src/views/login/Index.vue @@ -51,7 +51,10 @@ export default { alert('用户登录成功'); console.log(data.data); const token = data.data; + const username = data.username; + console.log(token, username); sessionStorage.setItem('token', token); + sessionStorage.setItem('username', username); await router.push('/home'); } else { alert(data.message);