UnisKB/ui/src/api/log.ts

36 lines
829 B
TypeScript
Raw Normal View History

2023-12-06 09:30:46 +00:00
import { Result } from '@/request/Result'
import { get, post, postStream, del, put } from '@/request/index'
import type { pageRequest } from '@/api/type/common'
import { type Ref } from 'vue'
const prefix = '/application'
/**
*
* @param
* application_id, history_day
* page {
"current_page": "string",
"page_size": "string",
}
* param {
"history_day": "string",
"search": "string",
}
*/
const getChatLog: (
applicaiton_id: String,
page: pageRequest,
param: any,
loading?: Ref<boolean>
) => Promise<Result<any>> = (applicaiton_id, page, param, loading) => {
return get(
`${prefix}/${applicaiton_id}/chat/${page.current_page}/${page.page_size}`,
param,
loading
)
}
export default {
getChatLog
}