Prechádzať zdrojové kódy

更新 接口地址逻辑

wzh 4 rokov pred
rodič
commit
d5e5a94976
1 zmenil súbory, kde vykonal 3 pridanie a 8 odobranie
  1. 3 8
      src/apis/config.js

+ 3 - 8
src/apis/config.js

@@ -1,13 +1,8 @@
-let baseurl = "https://interface.huihenduo.com.cn/hhd-pat/";
-if (
-  window.location.href.indexOf("localhost") != -1 ||
-  window.location.href.indexOf("test.photo.huihenduo.com.cn") != -1
-) {
-  baseurl = "https://interface.huihenduo.com.cn/hhd-pat-dev/";
-}
+import store from "../store/index";
+import axios from "axios";
 
+let baseurl = store.state.baseurl;
 const uploadUrl = `${baseurl}cos/upload`;
-import axios from "axios";
 
 axios.interceptors.response.use(
   function (response) {