fix: 关闭验证码功能前端控制显示

This commit is contained in:
xingyu
2022-07-28 10:28:03 +08:00
parent 62dc600c51
commit 30836b0797
5 changed files with 38 additions and 16 deletions

View File

@ -42,12 +42,19 @@ async function downloadFn<T = any>(option: AxiosConfig): Promise<T> {
return res as unknown as Promise<T>
}
async function uploadFn<T = any>(option: AxiosConfig): Promise<T> {
option.headersType = 'multipart/form-data'
const res = await request({ method: 'PUT', ...option })
return res as unknown as Promise<T>
}
export const useAxios = () => {
return {
get: getFn,
post: postFn,
delete: deleteFn,
put: putFn,
download: downloadFn
download: downloadFn,
upload: uploadFn
}
}