feat:增加 social 三方登录

This commit is contained in:
YunaiV
2025-04-06 20:43:40 +08:00
parent 32be95debd
commit c1098109a9
8 changed files with 759 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
import { requestClient } from '#/api/request';
import type { PageParam, PageResult } from '@vben/request';
export namespace SystemSocialUserApi {
/** 社交用户信息 */
export interface SystemSocialUser {
id?: number;
type: number;
openid: string;
token: string;
rawTokenInfo: string;
nickname: string;
avatar: string;
rawUserInfo: string;
code: string;
state: string;
createTime?: Date;
updateTime?: Date;
}
}
/** 查询社交用户列表 */
export function getSocialUserPage(params: PageParam) {
return requestClient.get<PageResult<SystemSocialUserApi.SystemSocialUser>>('/system/social-user/page',
{ params }
);
}
/** 查询社交用户详情 */
export function getSocialUser(id: number) {
return requestClient.get<SystemSocialUserApi.SystemSocialUser>(`/system/social-user/get?id=${id}`);
}