UI-Project/src/utils/request.js
@@ -1,9 +1,9 @@ import axios from 'axios' import useUserInfoStore from '@/stores/userInfo' import {host, WebSocketHost} from '@/utils/constants' const userStore=useUserInfoStore() const request = axios.create({ baseURL: `http://${WebSocketHost}:${host}/api`, // 注意!! 这里是全局统一加上了 后端接口前缀 前缀,后端必须进行跨域配置! baseURL: `http://${window.ipConfig.serverUrl}`, // 注意!! 这里是全局统一加上了 后端接口前缀 前缀,后端必须进行跨域配置! // baseURL: `http://${WebSocketHost}:${host}/api`, // 注意!! 这里是全局统一加上了 后端接口前缀 前缀,后端必须进行跨域配置! timeout: 30000 }) //