42 lines
822 B
TypeScript
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/'
|