feat: 第三方登录认证功能和管理页
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user