chore: vendor FBA UI 工程源码(fastapi-best-architecture-ui master,Epic #163 受控源码基础)
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
import type { PaginationResult } from '#/types';
|
||||
|
||||
import { requestClient } from './request';
|
||||
|
||||
export interface LoginLogParams {
|
||||
username?: string;
|
||||
status?: number;
|
||||
ip?: string;
|
||||
page?: number;
|
||||
size?: number;
|
||||
}
|
||||
|
||||
export interface LoginLogResult {
|
||||
id: number;
|
||||
username: string;
|
||||
status: number;
|
||||
ip: string;
|
||||
country?: string;
|
||||
region?: string;
|
||||
os?: string;
|
||||
browser?: string;
|
||||
device?: string;
|
||||
msg: string;
|
||||
login_time: string;
|
||||
}
|
||||
|
||||
export type OperaLogParams = LoginLogParams;
|
||||
|
||||
export interface OperaLogResult {
|
||||
id: number;
|
||||
trace_id: string;
|
||||
username?: string;
|
||||
method: string;
|
||||
title: string;
|
||||
path: string;
|
||||
ip: string;
|
||||
country?: string;
|
||||
region?: string;
|
||||
city?: string;
|
||||
user_agent: string;
|
||||
os?: string;
|
||||
browser?: string;
|
||||
device?: string;
|
||||
args?: JSON;
|
||||
status: number;
|
||||
code: string;
|
||||
msg: string;
|
||||
cost_time: number;
|
||||
opera_time: string;
|
||||
}
|
||||
|
||||
export async function getLoginLogListApi(params: LoginLogParams) {
|
||||
return requestClient.get<PaginationResult<LoginLogResult>>(
|
||||
'/api/v1/logs/login',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
export async function deleteLoginLogApi(pks: number[]) {
|
||||
return requestClient.delete('/api/v1/logs/login', { data: { pks } });
|
||||
}
|
||||
|
||||
export async function getOperaLogListApi(params: OperaLogParams) {
|
||||
return requestClient.get<PaginationResult<OperaLogResult>>(
|
||||
'/api/v1/logs/opera',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
export async function deleteOperaLogApi(pks: number[]) {
|
||||
return requestClient.delete('/api/v1/logs/opera', { data: { pks } });
|
||||
}
|
||||
Reference in New Issue
Block a user