This commit is contained in:
2026-01-29 10:43:43 +08:00
commit 4a76df3391
426 changed files with 74975 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
import request from '~/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LoginRecord, LoginRecordParam } from './model';
import { SERVER_API_URL } from '@/config';
/**
* 分页查询登录日志
*/
export async function pageLoginRecords(params: LoginRecordParam) {
const res = await request.get<ApiResult<PageResult<LoginRecord>>>(
SERVER_API_URL + '/system/login-record/page',
{ params }
);
if (res.code === 0) {
return res.data;
}
return Promise.reject(new Error(res.message));
}
/**
* 查询登录日志列表
*/
export async function listLoginRecords(params?: LoginRecordParam) {
const res = await request.get<ApiResult<LoginRecord[]>>(
SERVER_API_URL + '/system/login-record',
{ params }
);
if (res.code === 0 && res.data) {
return res.data;
}
return Promise.reject(new Error(res.message));
}