feat: 增加登录管理系统

This commit is contained in:
2025-06-10 20:01:56 +08:00
parent 829df0b1d1
commit 5bf38c2f1a
10 changed files with 34 additions and 26 deletions

View File

@@ -1,6 +1,6 @@
import { defineStore } from 'pinia'
import { ILoginType, ISession } from '@/types/auth'
import { loginHomeApi } from '@/apis/session'
import { loginAdminApi, loginHomeApi } from '@/apis/session'
import { ElMessage } from 'element-plus'
import { emailPattern, phonePattern } from '@/utils/element/elRules'
@@ -90,6 +90,9 @@ export const useAuthStore = defineStore('auth', {
case 'email':
this.homeSession = await loginHomeApi(email, emailCode)
break
case 'admin':
this.homeSession = await loginAdminApi(username, password)
break
default:
break
}