mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-12-31 22:57:09 +08:00
feat: 新增上传个人头像
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user