From 280474912fda85e1f911f01af57678473829ac2c Mon Sep 17 00:00:00 2001 From: guoapeng Date: Mon, 7 Jul 2025 20:23:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=93=E5=AD=98=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 45d3ff7..85efbb1 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -25,7 +25,7 @@ const keyboardVisible = ref(false) const keyboardType = ref<'text' | 'number'>('text') const softKeyboardRef = ref() const loginForm = ref>({ - name: import.meta.env.FT_NODE_ENV !== 'prod' ? 'admin' : '', + name: import.meta.env.FT_NODE_ENV !== 'prod' ? 'admin' : localStorage.getItem('username') || '', pwd: import.meta.env.FT_NODE_ENV !== 'prod' ? '9973' : '', }) const focusedInput = ref(null) @@ -66,6 +66,7 @@ const loginHandle = async () => { deviceStore.setDeviceState(res.rely.loginUser) } await router.push('/home') + localStorage.setItem('username', loginForm.value.name) loading.value = false }) }