-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathlog.ts
More file actions
55 lines (48 loc) · 1.11 KB
/
log.ts
File metadata and controls
55 lines (48 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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;
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>('/api/v1/logs/login', { params });
}
export async function getOperaLogListApi(params: OperaLogParams) {
return requestClient.get<PaginationResult>('/api/v1/logs/opera', { params });
}