|
|
@@ -2139,7 +2139,7 @@ public class HttpHelper : MonoBehaviour
|
|
|
public async UniTaskVoid GetGCYW_Station()
|
|
|
{
|
|
|
Debug.Log("获取B08GCYW 站点列表");
|
|
|
- using UnityWebRequest www = UnityWebRequest.Get("http://58.19.230.46:9180/prod-api/project/xunjianStation/treeList?pageNum=1&pageSize=999");
|
|
|
+ using UnityWebRequest www = UnityWebRequest.Get(ServerAddress.APIGCYWStation);
|
|
|
www.downloadHandler = new DownloadHandlerBuffer();
|
|
|
www.SetRequestHeader("Content-Type", "application/json");
|
|
|
await www.SendWebRequest();
|
|
|
@@ -2216,7 +2216,7 @@ public class HttpHelper : MonoBehaviour
|
|
|
string tempStr = JsonConvert.SerializeObject(sendData);
|
|
|
//Debug.Log($"GetStatistics data:{tempStr}");
|
|
|
var sendByte = System.Text.Encoding.UTF8.GetBytes(tempStr);
|
|
|
- using UnityWebRequest www = new UnityWebRequest("http://58.19.230.46:9180/prod-api/project/workOrder/statistics","POST");
|
|
|
+ using UnityWebRequest www = new UnityWebRequest(ServerAddress.APIGCYWWorkOrder,"POST");
|
|
|
www.uploadHandler = new UploadHandlerRaw(sendByte);
|
|
|
www.downloadHandler = new DownloadHandlerBuffer();
|
|
|
www.SetRequestHeader("Content-Type", "application/json");
|
|
|
@@ -2230,7 +2230,7 @@ public class HttpHelper : MonoBehaviour
|
|
|
{
|
|
|
GlobalData.B08_Type = ids;
|
|
|
string TFSJ_cmd =
|
|
|
- $"http://58.19.230.46:9180/prod-api/project/workOrder/list?pageNum=1&pageSize=999&type=2&stationId={ids}&isAsc=desc";
|
|
|
+ ServerAddress.APIGCYWList + $"?pageNum=1&pageSize=999&type=2&stationId={ids}&isAsc=desc";
|
|
|
|
|
|
UnityWebRequest TFSJ_www = new UnityWebRequest(TFSJ_cmd, "Get");
|
|
|
TFSJ_www.downloadHandler = new DownloadHandlerBuffer();
|
|
|
@@ -2269,7 +2269,7 @@ public class HttpHelper : MonoBehaviour
|
|
|
Debug.Log(TFSJ_result);
|
|
|
Debug.Log("!!!!!!!!!!!!!!!!!!!!");
|
|
|
|
|
|
- string XJRW_cmd = $"http://58.19.230.46:9180/prod-api/project/workOrder/list?pageNum=1&pageSize=999&type=3&stationId={ids}&isAsc=desc";
|
|
|
+ string XJRW_cmd = ServerAddress.APIGCYWList + $"?pageNum=1&pageSize=999&type=3&stationId={ids}&isAsc=desc";
|
|
|
UnityWebRequest XJRW_www = new UnityWebRequest(XJRW_cmd, "Get");
|
|
|
XJRW_www.downloadHandler = new DownloadHandlerBuffer();
|
|
|
XJRW_www.SetRequestHeader("Content-Type", "application/json");
|
|
|
@@ -2285,19 +2285,7 @@ public class HttpHelper : MonoBehaviour
|
|
|
Debug.Log(XJRW_result);
|
|
|
Debug.Log("!!!!!!!!!!!!!!!!!!!!");
|
|
|
|
|
|
- // string RWXQ_cmd = $"http://58.19.230.46:9180/prod-api/project/workOrder/list?pageNum=1&pageSize=999&type=3&stationId={ids}&isAsc=desc";
|
|
|
- // UnityWebRequest RWXQ_www = new UnityWebRequest(RWXQ_cmd, "Get");
|
|
|
- // RWXQ_www.downloadHandler = new DownloadHandlerBuffer();
|
|
|
- // RWXQ_www.SetRequestHeader("Content-Type", "application/json");
|
|
|
- // RWXQ_www.SetRequestHeader("Authorization", "Bearer "+token);
|
|
|
- // await RWXQ_www.SendWebRequest();
|
|
|
- // if (RWXQ_www.result != UnityWebRequest.Result.Success)
|
|
|
- // {
|
|
|
- // Debug.LogWarning($"获取{RWXQ_cmd}数据不成功,原因:返request不成功:" + RWXQ_www.downloadHandler.text);
|
|
|
- // }
|
|
|
- // string RWXQ_result = RWXQ_www.downloadHandler.text;
|
|
|
- // Debug.Log(RWXQ_result);
|
|
|
- // Debug.Log("!!!!!!!!!!!!!!!!!!!!");
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -2321,7 +2309,7 @@ public class HttpHelper : MonoBehaviour
|
|
|
|
|
|
public async Task<string> B08_API_TaskInfo(string id)
|
|
|
{
|
|
|
- string cmdUrl = $"http://58.19.230.46:9180/prod-api/project/workOrder/{id}/combined?limit=100";
|
|
|
+ string cmdUrl = ServerAddress.APIGCYWWorkOrderDetail + $"/{id}/combined?limit=100";
|
|
|
Debug.Log("!!!:" + cmdUrl +" token:"+token);
|
|
|
UnityWebRequest www = new UnityWebRequest(cmdUrl, "Get");
|
|
|
www.downloadHandler = new DownloadHandlerBuffer();
|
|
|
@@ -2339,7 +2327,7 @@ public class HttpHelper : MonoBehaviour
|
|
|
|
|
|
public async UniTaskVoid B08_ChartInfo()
|
|
|
{
|
|
|
- string cmdUrl = "http://58.19.230.46:9180/prod-api/project/workOrder/eventProjectTypeCount";
|
|
|
+ string cmdUrl = ServerAddress.APIGCYWChartInfo;
|
|
|
Debug.Log("!!!:" + cmdUrl +" token:"+token);
|
|
|
UnityWebRequest www = new UnityWebRequest(cmdUrl, "Get");
|
|
|
www.downloadHandler = new DownloadHandlerBuffer();
|
|
|
@@ -2357,7 +2345,7 @@ public class HttpHelper : MonoBehaviour
|
|
|
}
|
|
|
www.Dispose();
|
|
|
|
|
|
- cmdUrl = "http://58.19.230.46:9180/prod-api/project/workOrder/eventGradeCount";
|
|
|
+ cmdUrl = ServerAddress.APIGCYWGradeCount;
|
|
|
Debug.Log("!!!:" + cmdUrl +" token:"+token);
|
|
|
www = new UnityWebRequest(cmdUrl, "Get");
|
|
|
www.downloadHandler = new DownloadHandlerBuffer();
|