refactor(projects): axios封装完成

This commit is contained in:
Soybean
2021-11-23 00:23:43 +08:00
parent 451c7547af
commit 03b398af2f
21 changed files with 332 additions and 145 deletions

View File

@@ -1,8 +1,9 @@
import { createRequest } from './axios';
import { REQUEST_TIMEOUT, REQUEST_TIMEOUT_MSG } from './config';
import { REQUEST_TIMEOUT } from './config';
export const request = createRequest({
baseURL: import.meta.env.VITE_HTTP_URL,
timeout: REQUEST_TIMEOUT,
timeoutErrorMessage: REQUEST_TIMEOUT_MSG
timeout: REQUEST_TIMEOUT
});
export { resultMiddleware } from './helpers';