Void_F 2 өдөр өмнө
parent
commit
ef81b41723

+ 3 - 3
Assets/Prefabs/UI/Item/PointItem.prefab

@@ -17,7 +17,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &2705851486148901935
 RectTransform:
   m_ObjectHideFlags: 0
@@ -632,8 +632,8 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: 25.0063, y: -5}
-  m_SizeDelta: {x: 275.9874, y: 24}
+  m_AnchoredPosition: {x: 9.5851, y: -5}
+  m_SizeDelta: {x: 280, y: 24}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &2260640094963145895
 CanvasRenderer:

+ 8 - 1
Assets/Scripts/HttpGetData.cs

@@ -386,10 +386,17 @@ public class B08_TaskItems
     public string finishedTime;
 }
 
+[Serializable]
+public class B08_TaskLocationData
+{
+    public B08_TaskLocationInfo data;
+}
+
 [Serializable]
 public class B08_TaskLocationInfo
 {
-    public B08_TaskLocation[] data;
+    
+    public B08_TaskLocation[] locations;
 
 }
 

+ 7 - 7
Assets/Scripts/HttpHelper.cs

@@ -2112,7 +2112,7 @@ public class HttpHelper : MonoBehaviour
         {
             jsonStr = await B08_API_GetToken();
             GetToken tokenResult= JsonConvert.DeserializeObject<GetToken>(jsonStr);
-            Debug.Log("GetToken:" + tokenResult.data.token);
+            //Debug.Log("GetToken:" + tokenResult.data.token);
             token = tokenResult.data.token;
         }
         catch (Exception e)
@@ -2123,7 +2123,7 @@ public class HttpHelper : MonoBehaviour
         try
         {
             jsonStr = await B08_API_TaskInfoList(1,999);
-            Debug.Log("B08_API_TaskInfoList" + jsonStr);
+            //Debug.Log("B08_API_TaskInfoList" + jsonStr);
             GlobalData.B08TaskListData = JsonConvert.DeserializeObject<B08_TaskListInfoData>(jsonStr);
             //Debug.Log("GlobalData.B08TaskListData: "+GlobalData.B08TaskListData.rows.Length);
             // GlobalData.B08TaskListInfos = new B08_TaskListInfoData[GlobalData.B08InspectType.data.Length];
@@ -2141,8 +2141,8 @@ public class HttpHelper : MonoBehaviour
                     Debug.Log("tempInfo null! :"+tempResult);
                 }
                 string taskLocationResult = await B08_API_TaskLocation(GlobalData.B08TaskListData.rows[i].id);
-                //Debug.Log($"taskLocationResult id={GlobalData.B08TaskListData.rows[i].id}:" + taskLocationResult);
-                GlobalData.B08TaskListData.rows[i].infoData.Locations = JsonConvert.DeserializeObject<B08_TaskLocationInfo>(taskLocationResult).data;
+                Debug.Log($"taskLocationResult id={GlobalData.B08TaskListData.rows[i].id}:" + taskLocationResult);
+                GlobalData.B08TaskListData.rows[i].infoData.Locations = JsonConvert.DeserializeObject<B08_TaskLocationData>(taskLocationResult).data.locations;
 
             }
         }
@@ -2208,7 +2208,7 @@ public class HttpHelper : MonoBehaviour
     public async Task<string> B08_API_GetToken()
     {
         string cmdUrl = ServerAddress.API_GetToken;
-        Debug.Log("!!!:" + cmdUrl);
+        //Debug.Log("!!!:" + cmdUrl);
         UnityWebRequest www = new UnityWebRequest(cmdUrl, "Post");
         www.downloadHandler = new DownloadHandlerBuffer();
         www.SetRequestHeader("Content-Type", "application/json");
@@ -2283,8 +2283,8 @@ public class HttpHelper : MonoBehaviour
     public async Task<string> B08_API_TaskLocation(string id)
     {
         string cmdUrl = ServerAddress.API_B08_taskLocation;
-        cmdUrl += $"/{id}";
-        //Debug.Log("!!!:" + cmdUrl +" token:"+token);
+        cmdUrl += $"/{id}?useOptimized=true&includeWorkOrderInfo=true&limit=100";
+        Debug.Log("!!!:" + cmdUrl +" token:"+token);
         UnityWebRequest www = new UnityWebRequest(cmdUrl, "Get");
         www.downloadHandler = new DownloadHandlerBuffer();
         www.SetRequestHeader("Content-Type", "application/json");