mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 06:16:44 +08:00
增加函数:postJsonToFile
This commit is contained in:
@@ -141,6 +141,19 @@ const postJson=function(baseURL,url,postData){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导出文件请求
|
||||||
|
const postJsonToFile=function(baseURL,url,postData){
|
||||||
|
return request({
|
||||||
|
baseURL,
|
||||||
|
url: url,
|
||||||
|
method: 'post',
|
||||||
|
data:postData,
|
||||||
|
headers:{'Content-Type':'application/json;charset=utf-8'},
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* put请求
|
* put请求
|
||||||
*/
|
*/
|
||||||
@@ -174,6 +187,7 @@ export default {
|
|||||||
get,
|
get,
|
||||||
post,
|
post,
|
||||||
postJson,
|
postJson,
|
||||||
|
postJsonToFile,
|
||||||
put,
|
put,
|
||||||
putJson,
|
putJson,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user