Pārlūkot izejas kodu

旧接口保持原样。

JeffWang 3 gadi atpakaļ
vecāks
revīzija
1fb3169261
1 mainītis faili ar 12 papildinājumiem un 0 dzēšanām
  1. 12 0
      FactoryTool_CShare/Business/CommonMethod.cs

+ 12 - 0
FactoryTool_CShare/Business/CommonMethod.cs

@@ -1427,6 +1427,12 @@ end:
                 List<PostDateClass> postList = new List<PostDateClass>();
                 List<PostDateClass> postList = new List<PostDateClass>();
                 postList.Add(new PostDateClass("sn", SN));
                 postList.Add(new PostDateClass("sn", SN));
                 postList.Add(new PostDateClass("date", copydate));
                 postList.Add(new PostDateClass("date", copydate));
+                #region 新接口统一返回带/v1,reportlist.do依旧采用旧host地址;
+                if (host.EndsWith("/v1"))
+                {
+                    host = host.Replace("/v1", "");
+                }
+                #endregion
                 ParseText = FormPost.postFileMessage(host + "/reportlist.do?", postList, out status, timeout);
                 ParseText = FormPost.postFileMessage(host + "/reportlist.do?", postList, out status, timeout);
                 if (status)
                 if (status)
                 {
                 {
@@ -1492,6 +1498,12 @@ end:
             bool status;
             bool status;
             try
             try
             {
             {
+                #region 新接口统一返回带/v1,reportlist.do依旧采用旧host地址;
+                if (host.EndsWith("/v1"))
+                {
+                    host = host.Replace("/v1", "");
+                }
+                #endregion
                 ParseText = FormPost.postFileMessage(host + "/reportlist.do?", postList, out status, 30000);
                 ParseText = FormPost.postFileMessage(host + "/reportlist.do?", postList, out status, 30000);
                 if (status)
                 if (status)
                 {
                 {