ckgl/common/http/index.ts
2025-01-03 17:32:59 +08:00

42 lines
822 B
TypeScript

import httpRequest from '../http/interface'
import myconfig from '../http/config'
export const postAction = (url : string, data = {}, headerCustom = {}) => {
return httpRequest(
url,
'POST',
data,
headerCustom,
)
}
export const getAction = (url : string, data = {}, headerCustom = {}) => {
return httpRequest(
url,
'GET',
data,
headerCustom,
)
}
export const putAction = (url : string, data = {}, headerCustom = {}) => {
return httpRequest(
url,
'PUT',
data,
headerCustom
)
}
export const deleteAction = (url : string, data = {}, headerCustom = {}) => {
return httpRequest(
url,
'DELETE',
data,
headerCustom
)
}
export const uploadAction = (url : string, data = {}) => {
return httpRequest(
url,
'',
data,
)
}
// 默认全部导出 import api from '@/common/vmeitime-http/'