From 00038e4ff015038c6153bb14ad7d12eba5743ff8 Mon Sep 17 00:00:00 2001
From: 10191 <506754232@qq.com>
Date: Sat, 13 Sep 2025 15:36:45 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
SGGL/BLL/Common/CommonService.cs | 1 +
SGGL/WebAPI/Controllers/VideoController.cs | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/SGGL/BLL/Common/CommonService.cs b/SGGL/BLL/Common/CommonService.cs
index cebc0fe2..06462030 100644
--- a/SGGL/BLL/Common/CommonService.cs
+++ b/SGGL/BLL/Common/CommonService.cs
@@ -589,6 +589,7 @@ namespace BLL
///
public static string CreateGetHttpResponse(string url)
{
+ System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;//创建请求对象
request.Method = "Get";//请求方式
request.ContentType = "application/x-www-form-urlencoded";//链接类型
diff --git a/SGGL/WebAPI/Controllers/VideoController.cs b/SGGL/WebAPI/Controllers/VideoController.cs
index 2038c568..10d009f5 100644
--- a/SGGL/WebAPI/Controllers/VideoController.cs
+++ b/SGGL/WebAPI/Controllers/VideoController.cs
@@ -24,7 +24,6 @@ namespace WebAPI.Controllers
{
string url =ConfigurationManager.AppSettings["Video_URL"];
var project = BLL.ProjectService.GetProjectByProjectId(projectId);
-
string URLToken = "";
String restoken = BLL.CommonService.CreateGetHttpResponse(url + "api/v1/login?username=" + project.ProjectCode + "&password=" + Funs.EncryptionPassword(project.MonitorPW));
Dictionary dicres = JsonConvert.DeserializeObject>(restoken);
@@ -33,7 +32,6 @@ namespace WebAPI.Controllers
responeData.data = data;
List urls = new List();
string res = APIGetHttpService.Http(url + "api/v1/device/channeltree?token=" + URLToken);
- var name = BLL.ProjectService.GetProjectNameByProjectId(projectId);
List> jsonNvr = JsonConvert.DeserializeObject>>(res);
foreach (Dictionary nvr in jsonNvr)
{