refactor: vue3 axios api ...

This commit is contained in:
xingyu
2022-07-19 22:33:54 +08:00
parent ba96eef51a
commit 9e2e220b69
121 changed files with 1022 additions and 9700 deletions

View File

@ -1,19 +1,20 @@
import { defHttp } from '@/config/axios'
import type { JobLogVO } from './types'
import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()
// 任务日志列表
export const getJobLogPageApi = ({ params }) => {
return defHttp.get<PageResult<JobLogVO>>({ url: '/infra/job-log/page', params })
export const getJobLogPageApi = (params) => {
return request.get({ url: '/infra/job-log/page', params })
}
// 任务日志详情
export const getJobLogApi = (id: number) => {
return defHttp.get<JobLogVO>({ url: '/infra/job-log/get?id=' + id })
return request.get({ url: '/infra/job-log/get?id=' + id })
}
// 导出定时任务日志
export const exportJobLogApi = (params) => {
return defHttp.get({
return request.get({
url: '/infra/job-log/export-excel',
params,
responseType: 'blob'