Browse Source

提交部分接口接入正式服

wartheking 7 months ago
parent
commit
ace8cd295d

File diff suppressed because it is too large
+ 16 - 170
Assets/Scene 1.unity


+ 5 - 5
Assets/Scripts/HttpHelper.cs

@@ -38,7 +38,7 @@ public class HttpHelper : MonoBehaviour
         if (GlobalData.pageIndex == PageIndex.Page1)
         {
             //可以并行,无需等待
-            InitXHGKData();
+            InitXHGKData();//已完成迁移
         }
         if (GlobalData.pageIndex == PageIndex.Page1)
         {
@@ -68,9 +68,9 @@ public class HttpHelper : MonoBehaviour
     }
     public async Task InitYZTData()
     {
-        await InitYZTData1();
-        InitYZTData2();
-        InitYZTData3();
+        await InitYZTData1();//已完成迁移
+        InitYZTData2();//未完成迁移
+        InitYZTData3();//已完成迁移
 
     }
     public async Task InitYZTData1()
@@ -124,7 +124,7 @@ public class HttpHelper : MonoBehaviour
         {
             if (GlobalData.layerUnitDatas[i].type == LayerUnitType.JK)
             {
-                GlobalData.obsCameraLib.Add(GlobalData.layerUnitDatas[i].name, GlobalData.layerUnitDatas[i].name_pri);
+                GlobalData.obsCameraLib.Add(GlobalData.layerUnitDatas[i].name, GlobalData.layerUnitDatas[i].namePri);
             }
         }
     }

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

@@ -4,7 +4,7 @@ using UnityEngine;
 
 public class ServerAddress
 {
-    public static string YZTServerAddress = "http://www.chatgpt918.top:15000";
+    public static string YZTServerAddress = "http://10.123.10.11:9080";
     public static string Server_TextureSavePath = "http://www.chatgpt918.top:15001/images/";
     public static string ObsSeverAddress = "http://111.4.141.191:18089";
     public static string ObsSeverM3U8Address = "http://111.4.141.191:18088";
@@ -12,17 +12,17 @@ public class ServerAddress
     /// <summary>
     /// 获取一张图所有工程数据
     /// </summary>
-    public static string APIGetWaterManagerProject = YZTServerAddress + "/get-water-management-projects";
+    public static string APIGetWaterManagerProject = YZTServerAddress + "/open/data/projects";
 
     /// <summary>
     /// 获取一张图所有热点数据
     /// </summary>
-    public static string APIGetWaterHotPoint = YZTServerAddress + "/get-hot-point-data";
+    public static string APIGetWaterHotPoint = YZTServerAddress + "/open/data/hotPoint";
 
     /// <summary>
     /// 获取蓄洪概况大事件所有数据
     /// </summary>
-    public static string APIGetGetProjectMilestones = YZTServerAddress + "/get-project-milestones";
+    public static string APIGetGetProjectMilestones = YZTServerAddress + "/open/data/projectMilestones";
 
     /// <summary>
     /// 获取人口转移所有路径数据

+ 22 - 22
Assets/Scripts/UI/UIView/3D/GCZLLayer.cs

@@ -87,11 +87,11 @@ public class GCZLLayer : MonoBehaviour
         Info_DetailButton.onClick.AddListener(() =>
         {
             DetailTitleText.text = currentData.name;
-            zhaMenIconContent.SetActive(currentData.name_pri.Equals("BuYuan"));
-            OpenAniButton.gameObject.SetActive(currentData.name_pri.Equals("BuYuan") ||
-                                               currentData.name_pri.Equals("TaoKou"));
-            CloseAniButton.gameObject.SetActive(currentData.name_pri.Equals("BuYuan") ||
-                                                currentData.name_pri.Equals("TaoKou"));
+            zhaMenIconContent.SetActive(currentData.namePri.Equals("BuYuan"));
+            OpenAniButton.gameObject.SetActive(currentData.namePri.Equals("BuYuan") ||
+                                               currentData.namePri.Equals("TaoKou"));
+            CloseAniButton.gameObject.SetActive(currentData.namePri.Equals("BuYuan") ||
+                                                currentData.namePri.Equals("TaoKou"));
             ModelCameraCtrl._Instance.SetCameraActive(true);
             ResetDetailPanel();
             DetailPanel.SetActive(true);
@@ -161,7 +161,7 @@ public class GCZLLayer : MonoBehaviour
         OpenAniButton.onClick.AddListener(() =>
         {
             float[] openValues=new float[1];
-            if (currentData.name_pri.Equals("BuYuan"))
+            if (currentData.namePri.Equals("BuYuan"))
             {
                 openValues=new float[GlobalData.buYuanSensorData.data.Count];
                 for (int i = 0; i < openValues.Length; i++)
@@ -169,7 +169,7 @@ public class GCZLLayer : MonoBehaviour
                     openValues[i] = GlobalData.buYuanSensorData.data[i].gate_open ? 1.0f : 0.0f;
                 }
             }
-            if (currentData.name_pri.Equals("TaoKou"))
+            if (currentData.namePri.Equals("TaoKou"))
             {
                 openValues=new float[GlobalData.taoKouSensorData.data.Count];
                 for (int i = 0; i < openValues.Length; i++)
@@ -241,11 +241,11 @@ public class GCZLLayer : MonoBehaviour
         {
             for (int i = 0; i < GlobalData.layerUnitDatas.Count; i++)
             {
-                if (GlobalData.layerUnitDatas[i].special)
+                if (GlobalData.layerUnitDatas[i].special == "1")
                 {
                     GameObject obj = Instantiate(informationPrefab);
                     string realName = GlobalData.layerUnitDatas[i].name;
-                    string priName = GlobalData.layerUnitDatas[i].name_pri;
+                    string priName = GlobalData.layerUnitDatas[i].namePri;
                     var objType = GlobalData.layerUnitDatas[i].type;
                     string className = GlobalData.layerUnitDatas[i].GetTypeName();
                     obj.transform.SetParent(informationContent);
@@ -286,7 +286,7 @@ public class GCZLLayer : MonoBehaviour
                 {
                     GameObject obj = Instantiate(informationPrefab);
                     string realName = GlobalData.layerUnitDatas[i].name;
-                    string priName = GlobalData.layerUnitDatas[i].name_pri;
+                    string priName = GlobalData.layerUnitDatas[i].namePri;
                     var objType = GlobalData.layerUnitDatas[i].type;
                     string className = GlobalData.layerUnitDatas[i].GetTypeName();
                     obj.transform.SetParent(informationContent);
@@ -330,7 +330,7 @@ public class GCZLLayer : MonoBehaviour
     {
         InfoTitleText.text = currentData.name;
         InfoClassText.text = currentData.GetTypeName();
-        InfoFM.texture = TextureLoadHelp._Instance.GetTempTexture(currentData.name_pri);
+        InfoFM.texture = TextureLoadHelp._Instance.GetTempTexture(currentData.namePri);
         //todo
         InfoNoText.text = "未知";
         InfoDayText.text = "近期";
@@ -361,12 +361,12 @@ public class GCZLLayer : MonoBehaviour
                 lastPhotoButton.gameObject.SetActive(false);
                 nextPhotoButton.gameObject.SetActive(false);
                 
-                zhaMenIconContent.SetActive(currentData.name_pri.Equals("BuYuan"));
+                zhaMenIconContent.SetActive(currentData.namePri.Equals("BuYuan"));
                 
-                OpenAniButton.gameObject.SetActive(currentData.name_pri.Equals("BuYuan") ||
-                                                   currentData.name_pri.Equals("TaoKou"));
-                CloseAniButton.gameObject.SetActive(currentData.name_pri.Equals("BuYuan") ||
-                                                    currentData.name_pri.Equals("TaoKou"));
+                OpenAniButton.gameObject.SetActive(currentData.namePri.Equals("BuYuan") ||
+                                                   currentData.namePri.Equals("TaoKou"));
+                CloseAniButton.gameObject.SetActive(currentData.namePri.Equals("BuYuan") ||
+                                                    currentData.namePri.Equals("TaoKou"));
                 downloadPdfButton.gameObject.SetActive(false);
                 break;
             case 1:
@@ -420,7 +420,7 @@ public class GCZLLayer : MonoBehaviour
 
     public void ChangePhoto(int moveIndex)
     {
-        if (currentData.name_pri.Equals("BuYuan"))
+        if (currentData.namePri.Equals("BuYuan"))
         {
             switch (moveIndex)
             {
@@ -444,7 +444,7 @@ public class GCZLLayer : MonoBehaviour
                     break;
             }
         }
-        if (currentData.name_pri.Equals("TaoKou"))
+        if (currentData.namePri.Equals("TaoKou"))
         {
             switch (moveIndex)
             {
@@ -473,7 +473,7 @@ public class GCZLLayer : MonoBehaviour
     
     public void ChangePDF(int moveIndex)
     {
-        if (currentData.name_pri.Equals("BuYuan"))
+        if (currentData.namePri.Equals("BuYuan"))
         {
             switch (moveIndex)
             {
@@ -498,7 +498,7 @@ public class GCZLLayer : MonoBehaviour
                     break;
             }
         }
-        if (currentData.name_pri.Equals("TaoKou"))
+        if (currentData.namePri.Equals("TaoKou"))
         {
             switch (moveIndex)
             {
@@ -527,14 +527,14 @@ public class GCZLLayer : MonoBehaviour
 
     public void DownLoadPDF()
     {
-        if (currentData.name_pri.Equals("BuYuan"))
+        if (currentData.namePri.Equals("BuYuan"))
         {
             for (int i = 0; i < BY_PdfDownloadUrl.Length; i++)
             {
                 OpenNewWebsite(BY_PdfDownloadUrl[i]);     
             }
         }
-        if (currentData.name_pri.Equals("TaoKou"))
+        if (currentData.namePri.Equals("TaoKou"))
         {
             for (int i = 0; i < TK_PdfDownloadUrl.Length; i++)
             {

+ 3 - 3
Assets/Scripts/UI/UIView/BigScreen/BigScreenLayer.cs

@@ -163,7 +163,7 @@ public class BigScreenLayer : MonoBehaviour
                 List<LayerUnitData> tempDatas = new List<LayerUnitData>(GlobalData.layerUnitDatas);
                 for (int j = 0; j < tempDatas.Count; j++)
                 {
-                    if (tempDatas[j].special)
+                    if (tempDatas[j].special == "1")
                     {
                         int tempJ = j;
                         SecLayerBtn secLayerBtn = Instantiate(zTLayer.secLayerBtnPrefab);
@@ -171,7 +171,7 @@ public class BigScreenLayer : MonoBehaviour
                         secLayerBtn.GetComponent<RectTransform>().SetParent(layerBtn.secContent.GetComponent<RectTransform>());
                         secLayerBtn.btn.onClick.AddListener(() =>
                         {
-                            StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].name_pri);
+                            StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].namePri);
                             miniMap.gameObject.SetActive(false);
                             ChangeRightContent(tempJ);
                         });
@@ -195,7 +195,7 @@ public class BigScreenLayer : MonoBehaviour
                         secLayerBtn.GetComponent<RectTransform>().SetParent(layerBtn.secContent.GetComponent<RectTransform>());
                         secLayerBtn.btn.onClick.AddListener(() =>
                         {
-                            StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].name_pri);
+                            StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].namePri);
                             miniMap.gameObject.SetActive(false);
                             ChangeRightContent(tempJ);
                         });

+ 7 - 7
Assets/Scripts/UI/UIView/YZT/YZTLayer.cs

@@ -33,12 +33,12 @@ public enum LayerUnitType
 [System.Serializable]
 public class LayerUnitData
 {
-    public bool special;
+    public string special;
     public LayerUnitType type;
     public float longitude;
     public float latitude;
     public string name;
-    public string name_pri;
+    public string namePri;
     public string text1;
     public string text2;
 
@@ -77,7 +77,7 @@ public class HotPointData
     public float longitude;
     public float latitude;
     public string name;
-    public string name_pri;
+    public string namePri;
 }
 
 
@@ -531,7 +531,7 @@ public class YZTLayer : YZTRootLayer
                 List<LayerUnitData> tempDatas = new List<LayerUnitData>(GlobalData.layerUnitDatas);
                 for (int j = 0; j < tempDatas.Count; j++)
                 {
-                    if (tempDatas[j].special)
+                    if (tempDatas[j].special == "1")
                     {
                         int tempJ = j;
                         SecLayerBtn secLayerBtn = Instantiate(secLayerBtnPrefab);
@@ -541,7 +541,7 @@ public class YZTLayer : YZTRootLayer
                         {
                             CameraManager.SwitchCamera(0);
                             viewMode = ViewMode.normal;
-                            StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].name_pri);
+                            StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].namePri);
                             yZT.gameObject.SetActive(true);
                             ChangeRightContent(tempJ);
                             pointParent.gameObject.SetActive(false);
@@ -571,7 +571,7 @@ public class YZTLayer : YZTRootLayer
                         {
                             CameraManager.SwitchCamera(0);
                             viewMode = ViewMode.normal;
-                            StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].name_pri);
+                            StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].namePri);
                             yZT.gameObject.SetActive(true);
                             ChangeRightContent(tempJ);
                             pointParent.gameObject.SetActive(false);
@@ -668,7 +668,7 @@ public class YZTLayer : YZTRootLayer
             RuntimePoint newPoint = Instantiate(pointPrefab, Vector3.zero, Quaternion.identity);
             int tempI = i;
             newPoint.GetComponent<RectTransform>().SetParent(pointParent);
-            newPoint.InitPoint(hotPointSprite[(int)(temp.type)], temp.name_pri, temp.name); ;
+            newPoint.InitPoint(hotPointSprite[(int)(temp.type)], temp.namePri, temp.name); ;
             newPoint.layerIDs.Add((int)(temp.type));
             newPoint.bingObj = Instantiate(runtimePointObj).gameObject;
             newPoint.bingObj.transform.SetParent(shaPan.transform.GetChild(8));

Some files were not shown because too many files changed in this diff