mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-07 20:06:08 +08:00
增加api请求timeout
This commit is contained in:
parent
8001e61796
commit
a21cfb2880
|
@ -16,7 +16,7 @@ const errorHandler = function (error: any) {
|
||||||
throw error; // 如果throw. 错误将继续抛出.
|
throw error; // 如果throw. 错误将继续抛出.
|
||||||
};
|
};
|
||||||
|
|
||||||
const _request = extend({ timeout: 5000, params: { t: time }, errorHandler });
|
const _request = extend({ timeout: 60000, params: { t: time }, errorHandler });
|
||||||
|
|
||||||
_request.interceptors.request.use((url, options) => {
|
_request.interceptors.request.use((url, options) => {
|
||||||
const token = localStorage.getItem(config.authKey);
|
const token = localStorage.getItem(config.authKey);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user