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 }}
@@ -39,9 +39,7 @@ import { ref } from 'vue'
import { User, CaretBottom, UserFilled, Setting, SwitchButton } from '@element-plus/icons-vue'
const userInfo = ref({
- name: '张医生',
- role: '主治医师',
- department: '内科'
+ username: sessionStorage.getItem('username') || '未登录',
})
diff --git a/src/views/consultation/Record.vue b/src/views/consultation/Record.vue
index 48bc2c6..6e6126a 100644
--- a/src/views/consultation/Record.vue
+++ b/src/views/consultation/Record.vue
@@ -7,37 +7,33 @@
-
-
+
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);