This commit is contained in:
caishi 2023-06-06 17:03:35 +08:00
parent 9f0b481b43
commit 5b26684c61
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,10 @@ import axios from 'axios';
import { message , notification } from 'antd';
function beforeFetch(actionUrl){
if (window.location.href.indexOf('localhost') < 0) {
axios.defaults.withCredentials = true;
}
const service = axios.create({
baseURL: actionUrl,
timeout: 1800000, // 请求超时时间