@ylfe/tools
v0.3.10
Published
## 使用方法 ``` import { download, createRequest } from '@ylfe/tools'
Downloads
2
Keywords
Readme
tools
使用方法
import { download, createRequest } from '@ylfe/tools'
const request = createRequest()
const res = requst({
url,
method,
data
})
download(res)
createRequest(opts, reqHandle, resHandle, reqErrorHandle, resErrorHandle )方法可传参进行配置
opts: axiosConfig
reqHandle: 请求拦截
resHandle: 拦截函数
reqErrorHandle: 请求错误函数
resErrorHandle:响应错误函数