jiaweiqi 1 year ago
parent
commit
5662d3e388
1 changed files with 3 additions and 2 deletions
  1. 3 2
      serves/axios.js

+ 3 - 2
serves/axios.js

@@ -2,8 +2,9 @@ import axios from "axios";
 // import { gettoken } from "../services/token";
 // axios.defaults.withCredentials=true;
 const instance = axios.create({
-  //baseURL: 'http://192.168.2.164:8899', //请求的基础地址
-  baseURL: 'https://scrm.zzliaoyuan.com/backend', //请求的基础地址
+  // baseURL: 'http://192.168.2.164:8899', //请求的基础地址
+  baseURL: window.location.origin + "/backend",
+  // baseURL: 'https://scrm.zzliaoyuan.com/backend', //请求的基础地址
   timeout: 60000, //请求超时的时间
 });
 //发一个get请求