Browse Source

修改导入host

zhouna 6 năm trước cách đây
mục cha
commit
28c364a47a
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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 {