UPDATE: 调整超时时间到1200秒
This commit is contained in:
@@ -193,11 +193,13 @@ class RequestHttp {
|
|||||||
* 针对excel的上传,默认返回的是blob类型,Excel没问题时返回json特殊处理
|
* 针对excel的上传,默认返回的是blob类型,Excel没问题时返回json特殊处理
|
||||||
*/
|
*/
|
||||||
uploadExcel(url: string, params?: object, _object = {}): Promise<BlobPart> {
|
uploadExcel(url: string, params?: object, _object = {}): Promise<BlobPart> {
|
||||||
return this.service.post(url, params, {
|
return this.service
|
||||||
..._object,
|
.post(url, params, {
|
||||||
headers: { 'Content-Type': 'multipart/form-data' },
|
..._object,
|
||||||
responseType: 'blob'
|
headers: { 'Content-Type': 'multipart/form-data' },
|
||||||
}).then(res => res.data)
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
.then(res => res.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加SSE连接方法
|
// 添加SSE连接方法
|
||||||
@@ -220,8 +222,8 @@ class RequestHttp {
|
|||||||
headers: {
|
headers: {
|
||||||
Authorization: 'Bearer ' + userStore.accessToken
|
Authorization: 'Bearer ' + userStore.accessToken
|
||||||
},
|
},
|
||||||
// 增加超时时间到120秒
|
// 增加超时时间到1200秒
|
||||||
heartbeatTimeout: 120000
|
heartbeatTimeout: 1200000
|
||||||
})
|
})
|
||||||
|
|
||||||
// 设置默认的Authorization头部
|
// 设置默认的Authorization头部
|
||||||
|
|||||||
Reference in New Issue
Block a user