From 4a800a8fc83c6bd1f86a8e847b079a51a7532c09 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期三, 20 七月 2022 15:05:58 +0800
Subject: [PATCH] 修复国标配置的bug

---
 src/api/pollConfig.ts |   34 +++++++++++++++++++---------------
 1 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/src/api/pollConfig.ts b/src/api/pollConfig.ts
index 0abd33b..477f98e 100644
--- a/src/api/pollConfig.ts
+++ b/src/api/pollConfig.ts
@@ -1,36 +1,40 @@
-import request from "@/scripts/httpRequest";
-import qs from "qs";
+import request from "@/scripts/httpRequest"
+import qs from "qs"
 
 export const getPollConfig = () => {
   return request({
     url: "/data/api-v/pollConfig/getPollConfig",
     method: "get"
-  });
-};
+  })
+}
 
 export const changeRunType = (params: any) => {
+  let apiUrl = "/data/api-v/camera/changeRunType"
+  if (params.isGb) {
+    apiUrl = "/data/api-v/gb28181/camera/changeRunType"
+  }
   return request({
-    url: "/data/api-v/camera/changeRunType",
+    url: apiUrl,
     method: "post",
     data: params
-  });
-};
+  })
+}
 
 export const updatePollEnable = (params: any) => {
   return request({
     url: "/data/api-v/pollConfig/updateEnable",
     method: "post",
     data: params
-  });
-};
+  })
+}
 
 export const updatePollPeriod = (params: any) => {
   return request({
     url: "/data/api-v/pollConfig/savePollPeriod",
     method: "post",
     data: qs.stringify(params)
-  });
-};
+  })
+}
 
 export const getCamerasByServer = (query: any) => {
   return request({
@@ -38,7 +42,7 @@
     method: "get",
     params: query
   })
-};
+}
 
 export const statisticRunInfo = (query: any) => {
   return request({
@@ -46,12 +50,12 @@
     method: "get",
     params: query
   })
-};
+}
 
 export const updateChannelCount = (params: any) => {
   return request({
     url: "/data/api-v/pollConfig/updateChannelCount",
     method: "post",
     data: params
-  });
-};
+  })
+}

--
Gitblit v1.8.0