2024-09-03 16:46:42 +08:00
|
|
|
import type { SocialInfo } from './model';
|
|
|
|
|
2025-01-10 14:02:21 +08:00
|
|
|
import type { ID } from '#/api/common';
|
|
|
|
|
2024-09-03 16:46:42 +08:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2025-01-10 14:02:21 +08:00
|
|
|
/**
|
|
|
|
* @deprecated 并没有用到这个方法
|
|
|
|
*/
|
|
|
|
export function socialInfo(id: ID) {
|
2024-09-03 16:46:42 +08:00
|
|
|
return requestClient.get(`${Api.root}/${id}`);
|
|
|
|
}
|