diff --git a/dashboard/src/layouts/full/vertical-header/VerticalHeader.vue b/dashboard/src/layouts/full/vertical-header/VerticalHeader.vue index b61a8f1ca..e7c436642 100644 --- a/dashboard/src/layouts/full/vertical-header/VerticalHeader.vue +++ b/dashboard/src/layouts/full/vertical-header/VerticalHeader.vue @@ -11,6 +11,7 @@ const customizer = useCustomizerStore(); let dialog = ref(false); let accountWarning = ref(false) let updateStatusDialog = ref(false); +const username = localStorage.getItem('user'); let password = ref(''); let newPassword = ref(''); let newUsername = ref(''); @@ -54,7 +55,7 @@ function accountEdit() { axios.post('/api/auth/account/edit', { password: password.value, new_password: newPassword.value, - new_username: newUsername.value + new_username: newUsername.value ? newUsername.value : username }) .then((res) => { if (res.data.status == 'error') { @@ -408,13 +409,15 @@ if (localStorage.getItem('change_pwd_hint') != null && localStorage.getItem('cha
为了安全,请务必修改默认密码。
- + + + + + - -