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

This commit is contained in:
TsMask
2025-08-12 09:53:38 +08:00
parent 246bb9a7e0
commit 38f0b9b560
21 changed files with 2355 additions and 411 deletions

View File

@@ -27,8 +27,8 @@ type UserInfo = {
email: string;
/**用户性别 */
sex: string | undefined;
/**其他信息 */
profile: Record<string, any>;
/**用户类型 */
userType: string;
};
const useUserStore = defineStore('user', {
@@ -42,7 +42,7 @@ const useUserStore = defineStore('user', {
phonenumber: '',
email: '',
sex: undefined,
profile: {},
userType: 'System',
}),
getters: {
/**
@@ -122,6 +122,7 @@ const useUserStore = defineStore('user', {
this.phonenumber = user.phonenumber;
this.email = user.email;
this.sex = user.sex;
this.userType = user.userType;
// 验证返回的roles是否是一个非空数组
if (Array.isArray(roles) && roles.length > 0) {