mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 10:56:44 +08:00
增加方法postPdf
This commit is contained in:
@@ -141,13 +141,25 @@ const postJson=function(baseURL,url,postData){
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const postPdf=function(baseURL,url,postData){
|
||||
return request({
|
||||
baseURL,
|
||||
url: url,
|
||||
responseType: 'blob',
|
||||
method: 'post',
|
||||
data:postData,
|
||||
headers:{'Content-Type':'application/pdf'},
|
||||
})
|
||||
}
|
||||
|
||||
// 导出文件请求定义
|
||||
const postJsonToFile=function(baseURL,url,postData){
|
||||
return request({
|
||||
baseURL,
|
||||
url: url,
|
||||
method: 'post',
|
||||
data:postData,
|
||||
data:postData,
|
||||
headers:{'Content-Type':'application/json;charset=utf-8'},
|
||||
responseType: 'blob'
|
||||
})
|
||||
@@ -191,4 +203,5 @@ export default {
|
||||
postJsonToFile,
|
||||
put,
|
||||
putJson,
|
||||
postPdf,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user