feat:增加 social 三方登录
This commit is contained in:
44
apps/web-antd/src/api/system/social/client/index.ts
Normal file
44
apps/web-antd/src/api/system/social/client/index.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
export namespace SystemSocialClientApi {
|
||||
/** 社交客户端信息 */
|
||||
export interface SystemSocialClient {
|
||||
id?: number;
|
||||
name: string;
|
||||
socialType: number;
|
||||
userType: number;
|
||||
clientId: string;
|
||||
clientSecret: string;
|
||||
agentId?: string;
|
||||
status: number;
|
||||
createTime?: Date;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询社交客户端列表 */
|
||||
export function getSocialClientPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemSocialClientApi.SystemSocialClient>>('/system/social-client/page',
|
||||
{ params }
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询社交客户端详情 */
|
||||
export function getSocialClient(id: number) {
|
||||
return requestClient.get<SystemSocialClientApi.SystemSocialClient>(`/system/social-client/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增社交客户端 */
|
||||
export function createSocialClient(data: SystemSocialClientApi.SystemSocialClient) {
|
||||
return requestClient.post('/system/social-client/create', data);
|
||||
}
|
||||
|
||||
/** 修改社交客户端 */
|
||||
export function updateSocialClient(data: SystemSocialClientApi.SystemSocialClient) {
|
||||
return requestClient.put('/system/social-client/update', data);
|
||||
}
|
||||
|
||||
/** 删除社交客户端 */
|
||||
export function deleteSocialClient(id: number) {
|
||||
return requestClient.delete(`/system/social-client/delete?id=${id}`);
|
||||
}
|
||||
32
apps/web-antd/src/api/system/social/user/index.ts
Normal file
32
apps/web-antd/src/api/system/social/user/index.ts
Normal 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}`);
|
||||
}
|
||||
Reference in New Issue
Block a user