Browse Source

提交忘记提交的内容

wartheking 3 tuần trước cách đây
mục cha
commit
2e366987df

+ 15 - 12
Assets/Scripts/HttpHelper.cs

@@ -40,18 +40,19 @@ public class HttpHelper : MonoBehaviour
 
     void ChangeServerAddress()
     {
-        if (System.IO.File.Exists(Application.streamingAssetsPath + "/serverPath.json"))
-        {
-            string serverAddressContent = System.IO.File.ReadAllText(Application.streamingAssetsPath + "/serverPath.json");
-            Debug.Log(serverAddressContent);
-            DYServerAddress address = JsonConvert.DeserializeObject<DYServerAddress>(serverAddressContent);
-            ServerAddress.YZTServerAddress = address.YZTServerAddress;
-            ServerAddress.YZTServerPYAddress = address.YZTServerPYAddress;
-            ServerAddress.Server_UploadPath = address.Server_UploadPath;
-            ServerAddress.ModbusSeverAddress = address.ModbusSeverAddress;
-            ServerAddress.ObsSeverAddress = address.ObsSeverAddress;
-            ServerAddress.ObsSeverM3U8Address = address.ObsSeverM3U8Address;
-        }
+        //if (System.IO.File.Exists(Application.streamingAssetsPath + "/serverPath.json"))
+        //{
+        //    string serverAddressContent = System.IO.File.ReadAllText(Application.streamingAssetsPath + "/serverPath.json");
+        //    Debug.Log(serverAddressContent);
+        //    DYServerAddress address = JsonConvert.DeserializeObject<DYServerAddress>(serverAddressContent);
+        //    ServerAddress.YZTServerAddress = address.YZTServerAddress;
+        //    ServerAddress.YZTServerPYAddress = address.YZTServerPYAddress;
+        //    ServerAddress.Server_UploadPath = address.Server_UploadPath;
+        //    ServerAddress.ModbusSeverAddress = address.ModbusSeverAddress;
+        //    ServerAddress.ObsSeverAddress = address.ObsSeverAddress;
+        //    Debug.Log(ServerAddress.ObsSeverAddress);
+        //    ServerAddress.ObsSeverM3U8Address = address.ObsSeverM3U8Address;
+        //}
     }
 
 
@@ -489,6 +490,7 @@ public class HttpHelper : MonoBehaviour
     {
         bool successInternet = true;
         string sendUrl = ServerAddress.API_GetDevicesInfo;
+        Debug.Log(ServerAddress.ObsSeverAddress);
         sendUrl += "/34020000001180000001/channels?page=1&count=100";
         Debug.Log(sendUrl);
         UnityWebRequest requestData = UnityWebRequest.Get(sendUrl);
@@ -525,6 +527,7 @@ public class HttpHelper : MonoBehaviour
                         ObsData obsData = new ObsData();
                         string originName = serverObsDatas.list[i].name;
                         obsData.name = "补元-" + serverObsDatas.list[i].name;
+                        //Debug.Log("111" + obsData.name);
                         if (GlobalData.obsCameraLib.TryGetValue(originName, out var value))
                         {
                             obsData.targetName = value;

+ 2 - 2
Assets/Scripts/UI/Tools/ServerAddress.cs

@@ -9,7 +9,7 @@ public class ServerAddress
     public static string Server_UploadPath = "http://58.19.230.46:15001";
     public static string ModbusSeverAddress = "http://58.19.230.46:8300";
     public static string ObsSeverAddress = "http://58.19.230.46:18089";
-    public static string ObsSeverM3U8Address = "http://58.19.230.46:18088";
+    public static string ObsSeverM3U8Address = "http://58.19.230.46:9081";
     
     /// <summary>
     /// 获取一张图所有工程数据
@@ -127,7 +127,7 @@ public class ServerAddress
     // inspectType 巡检类型总计
 
     public static string API_GetDevicesInfo = ObsSeverAddress+"/api/device/query/devices";
-    public static string API_PlayStart = ObsSeverAddress+"/api/play/start";
+    public static string API_PlayStart = ObsSeverM3U8Address + "/camera/play";
     public static string API_CameraCtrl = ObsSeverAddress+"/api/ptz/control";
 
 

+ 3 - 2
Assets/Scripts/UI/UIView/GCJK/GCJKLayer.cs

@@ -825,9 +825,10 @@ public class GCJKLayer : YZTRootLayer
         {
             Destroy(_obsIconCtrls[i].gameObject);
         }
-
+        
         for (int i = 0; i < GlobalData.obsDatas_by.Count; i++)
         {
+            Debug.Log(GlobalData.obsDatas_by[i].name + ":000:" + GlobalData.obsDatas_by[i].targetName);
             ObsItem tempItem = Instantiate(obsItemPrefab, obsItemContent).GetComponent<ObsItem>();
             tempItem.SetData(GlobalData.obsDatas_by[i]);
             int tempi = i;
@@ -837,7 +838,7 @@ public class GCJKLayer : YZTRootLayer
             });
             _obsItems.Add(tempItem);
             ObsIconCtrl tempIcon = Instantiate(obsIconPrefab, _obsIconContent).GetComponent<ObsIconCtrl>();
-            Debug.Log(GlobalData.obsDatas_by[i].name + " " + GlobalData.obsDatas_by[i].targetName);
+            Debug.Log(GlobalData.obsDatas_by[i].name + ":111:" + GlobalData.obsDatas_by[i].targetName);
             tempIcon.Init(GlobalData.obsDatas_by[i]);
             _obsIconCtrls.Add(tempIcon);
             //Debug.Log(StaticLod.instance.GetStaticObj(GlobalData.obsDatas[i].name).gameObject.name);

+ 6 - 6
Assets/StreamingAssets/serverPath.json

@@ -1,9 +1,9 @@
 {
-    "YZTServerAddress" : "http://10.123.10.11:9081",
-    "YZTServerPYAddress" : "http://10.123.10.11:15005",
-    "Server_UploadPath" : "http://10.123.10.11:15001",
-    "ModbusSeverAddress" : "http://10.123.10.11:8300",
-    "ObsSeverAddress" : "http://10.123.10.18:18089",
-    "ObsSeverM3U8Address" : "http://10.123.10.18:18088"
+    "YZTServerAddress" : "http://58.19.230.46:9081",
+    "YZTServerPYAddress" : "http://58.19.230.46:15005",
+    "Server_UploadPath" : "http://58.19.230.46:15001",
+    "ModbusSeverAddress" : "http://58.19.230.46:8300",
+    "ObsSeverAddress" : "http://58.19.230.46:18089",
+    "ObsSeverM3U8Address" : "http://58.19.230.46:18088"
 }