mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
feat: 添加文件上传示例
This commit is contained in:
@@ -9,3 +9,17 @@ type Result = {
|
||||
export const mapJson = (params?: object) => {
|
||||
return http.request<Result>("get", "/get-map-info", { params });
|
||||
};
|
||||
|
||||
/** 文件上传 */
|
||||
export const formUpload = data => {
|
||||
return http.request<Result>(
|
||||
"post",
|
||||
"https://run.mocky.io/v3/3aa761d7-b0b3-4a03-96b3-6168d4f7467b",
|
||||
{ data },
|
||||
{
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data"
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user