mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-14 21:36:42 +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请求
|
||||
*/
|
||||
@@ -174,6 +187,7 @@ export default {
|
||||
get,
|
||||
post,
|
||||
postJson,
|
||||
postJsonToFile,
|
||||
put,
|
||||
putJson,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user