feat: 个人中心(未完成)

This commit is contained in:
dap
2024-09-03 16:46:42 +08:00
parent 450a598b30
commit 71f137eda3
12 changed files with 463 additions and 93 deletions

View File

@@ -0,0 +1,20 @@
import type { SocialInfo } from './model';
import { requestClient } from '#/api/request';
enum Api {
root = '/system/social',
socialList = '/system/social/list',
}
/**
* 获取绑定的社交信息列表
* @returns info
*/
export function socialList() {
return requestClient.get<SocialInfo[]>(Api.socialList);
}
export function socialInfo(id: number | string) {
return requestClient.get(`${Api.root}/${id}`);
}

View File

@@ -0,0 +1,26 @@
export interface SocialInfo {
id: string;
userId: number;
tenantId: string;
authId: string;
source: string;
accessToken: string;
expireIn: number;
refreshToken: string;
openId: string;
userName: string;
nickName: string;
email: string;
avatar: string;
accessCode?: any;
unionId?: any;
scope: string;
tokenType: string;
idToken?: any;
macAlgorithm?: any;
macKey?: any;
code?: any;
oauthToken?: any;
oauthTokenSecret?: any;
createTime: string;
}