浏览代码

空间分析地址判断

sujunling 1 年之前
父节点
当前提交
7344e2a3f0
共有 1 个文件被更改,包括 13 次插入10 次删除
  1. 13 10
      src/api/interface/interface.ts

+ 13 - 10
src/api/interface/interface.ts

@@ -158,16 +158,19 @@ export function getAllInterface(e) {
  *     endTime    结束时间     2022-09-29
 */
 export function queryBusinessStatistics(params) {
-    return new Promise<void>((resolve) => {
-        defHttp.post({ url: Api.BusinessStatistics, params })
-            .then((r) => {
-                if (r.resp_code == 0 && r.datas) {
-                    resolve(r.datas);
-                } else {
-                    resolve();
-                }
-            })
-    })
+    var url = window.location.href;
+    if(!url.indexOf("localhost") > -1 && !url.indexOf("127.0.0.1") > -1 && !url.indexOf("106.12.170.138") > -1){
+        return new Promise<void>((resolve) => {
+            defHttp.post({ url: Api.BusinessStatistics, params })
+                .then((r) => {
+                    if (r.resp_code == 0 && r.datas) {
+                        resolve(r.datas);
+                    } else {
+                        resolve();
+                    }
+                })
+        })
+    }
 }
 
 /**