feat: 第三方登录认证功能和管理页

This commit is contained in:
TsMask
2025-08-12 09:54:37 +08:00
parent 0514c58b63
commit a7b539cd36
18 changed files with 2370 additions and 416 deletions

View File

@@ -13,7 +13,7 @@ import { parseUrlPath } from '@/plugins/file-static-url';
/**用户信息类型 */
type UserInfo = {
/**用户ID */
/**是否强制修改密码 */
forcePasswdChange: boolean;
/**用户ID */
userId: string;
@@ -33,8 +33,8 @@ type UserInfo = {
email: string;
/**用户性别 */
sex: string | undefined;
/**其他信息 */
profile: Record<string, any>;
/**用户类型 */
userType: string;
};
const useUserStore = defineStore('user', {
@@ -49,7 +49,7 @@ const useUserStore = defineStore('user', {
phone: '',
email: '',
sex: undefined,
profile: {},
userType: 'System',
}),
getters: {
/**
@@ -132,6 +132,7 @@ const useUserStore = defineStore('user', {
this.phone = user.phone;
this.email = user.email;
this.sex = user.sex;
this.userType = user.userType;
// 验证返回的roles是否是一个非空数组
if (Array.isArray(roles) && roles.length > 0) {