From 241d327e57cbfe504aa806c61aa22e6205706098 Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期六, 11 四月 2026 16:59:46 +0800
Subject: [PATCH] 引用纠正

---
 fzzy-igdss-web/src/main/resources/static/security/video-control.js |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/fzzy-igdss-web/src/main/resources/static/security/video-control.js b/fzzy-igdss-web/src/main/resources/static/security/video-control.js
index c2b107f..cb15b21 100644
--- a/fzzy-igdss-web/src/main/resources/static/security/video-control.js
+++ b/fzzy-igdss-web/src/main/resources/static/security/video-control.js
@@ -30,26 +30,41 @@
 
 //浜戝彴鎺у埗
 function ptzControl(command) {
+    if (!gatewaySer) {
+        layer.msg("鏈幏鍙栧埌搴撳尯缃戝叧淇℃伅锛屼簯鍙版帶鍒跺け璐ワ紒");
+        return;
+    }
+    var url = "http://" + gatewaySer.ip + ":" + gatewaySer.apiPort + gatewaySer.ptzUrl;
+
    // layer.msg('寮�濮嬭皟鐢ㄤ簯鍙扳�︹��', {icon: 1, time: 1200,offset:'rb'});
     const param = getParam(command, null);
-    const url = "/security/ptz-media";
     sendControlCommand(url, param);
 }
 
 //棰勭疆浣嶆帶鍒�
 function presetControl(command) {
+    if (!gatewaySer) {
+        layer.msg("鏈幏鍙栧埌搴撳尯缃戝叧淇℃伅锛屼簯鍙版帶鍒跺け璐ワ紒");
+        return;
+    }
+    var url = "http://" + gatewaySer.ip + ":" + gatewaySer.apiPort + gatewaySer.ptzUrl;
+
     //layer.msg('寮�濮嬫墽琛屸�︹��', {icon: 1, time: 1200,offset:'rb'});
     const preset = $("#preset").val();
     const param = getParam(command, preset);
-    const url = "/security/ptz-media";
     sendControlCommand(url, param);
 }
 
 //鍋滄绉诲姩
 function moveStop() {
+    if (!gatewaySer) {
+        layer.msg("鏈幏鍙栧埌搴撳尯缃戝叧淇℃伅锛屼簯鍙版帶鍒跺け璐ワ紒");
+        return;
+    }
+    var url = "http://" + gatewaySer.ip + ":" + gatewaySer.apiPort + gatewaySer.ptzUrl;
+
     //layer.msg('寮�濮嬭皟鐢ㄤ簯鍙扳�︹��', {icon: 1, time: 1200,offset:'rb'});
     const param = getParam(0, null);
-    const url = "/security/ptz-media";
     sendControlCommand(url, param);
 }
 

--
Gitblit v1.9.3