刷卡登录
This commit is contained in:
@@ -44,11 +44,6 @@ const loading = ref(false)
|
||||
// 登录
|
||||
const handleLogin = async () => {
|
||||
console.log("卡号登录handleLogin")
|
||||
// 检查用户是否已经登录
|
||||
if (userStore.token) {
|
||||
console.log("卡号-用户已登录")
|
||||
return
|
||||
}
|
||||
|
||||
const isInvalid = await formRef.value?.validate()
|
||||
if (isInvalid) return
|
||||
@@ -75,6 +70,8 @@ const handleLogin = async () => {
|
||||
Message.success('欢迎使用')
|
||||
} catch (error) {
|
||||
// 登录失败处理
|
||||
console.error('刷卡登录失败:', error)
|
||||
Message.error( '登录失败,请刷新页面')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user