2023-11-22 10:37:08 +00:00
|
|
|
import { Result } from '@/request/Result'
|
|
|
|
|
import { get, post, del, put } from '@/request/index'
|
2023-11-23 09:20:19 +00:00
|
|
|
import type { pageRequest } from '@/api/type/common'
|
2023-11-22 10:37:08 +00:00
|
|
|
const prefix = '/application'
|
|
|
|
|
|
2023-11-23 09:20:19 +00:00
|
|
|
/**
|
|
|
|
|
* 获取分页应用
|
|
|
|
|
* @param 参数 {
|
|
|
|
|
"current_page": "string",
|
|
|
|
|
"page_size": "string",
|
|
|
|
|
"name": "string",
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
const getApplication: (param: pageRequest) => Promise<Result<any>> = (param) => {
|
|
|
|
|
return get(
|
|
|
|
|
`${prefix}/${param.current_page}/${param.page_size}`,
|
|
|
|
|
param.name && { name: param.name }
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
export default {
|
|
|
|
|
getApplication
|
|
|
|
|
}
|