Explorar el Código

修改导入host

zhouna hace 6 años
padre
commit
28c364a47a
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      src/components/Inspect/index.jsx

+ 3 - 1
src/components/Inspect/index.jsx

@@ -26,8 +26,10 @@ import {isIE} from '@utils/tools.js';
 
 import "./dists/FileAPI.js";
 
+const isLocal = window.location.hostname.indexOf('localhost')!=-1;
+const qhost = isLocal?host:'';
 const api = {
-    upload: host+'/api/icss/lisExcelRes/lisExcelAnalysis'
+    upload: qhost+'/api/icss/lisExcelRes/lisExcelAnalysis'
 };
 
 class Inspect extends React.Component {