feat: 新增上传个人头像

This commit is contained in:
2024-04-27 19:21:44 +08:00
parent 5f4ea2eb0b
commit c938028d8d
12 changed files with 222 additions and 131 deletions

View File

@@ -26,7 +26,7 @@ export function downloadByUrl({
}): Promise<boolean> {
// 是否同源
const isSameHost = new URL(url).host == location.host
return new Promise<boolean>((resolve, reject) => {
return new Promise<boolean>((resolve) => {
if (isSameHost) {
const link = document.createElement('a')
link.href = url

View File

@@ -177,7 +177,7 @@ const del = <T = any>(url: string, params?: object, config?: AxiosRequestConfig)
...config
})
}
const download = <T = any>(url: string, params?: object, config?: AxiosRequestConfig): Promise<AxiosResponse> => {
const download = (url: string, params?: object, config?: AxiosRequestConfig): Promise<AxiosResponse> => {
return requestNative({
method: 'get',
url,