瀏覽代碼

调整getmessage返回host的处理方式:原本返回的IDManager不变,GetIDMKey接口处理url。

Jeff 3 年之前
父節點
當前提交
24c06d6ae9
共有 1 個文件被更改,包括 8 次插入18 次删除
  1. 8 18
      FactoryTool_CShare/Business/CommonMethod.cs

+ 8 - 18
FactoryTool_CShare/Business/CommonMethod.cs

@@ -367,16 +367,6 @@ namespace MOKA_Factory_Tools
         /// <returns></returns>
         public static bool GetMidAddress2(MidList midInfo, string order, SQLiteConnection sqliteConn, out List<MidAddress> midAddressList)
         {
-            #region 新抄写接口预处理
-            string url = midInfo.host;
-            // 逆序去除第一个斜杠后的字符,再拼接"IDManage"
-            int nPos = url.LastIndexOf('/');
-            if (nPos > 0)
-            {
-                url = url.Substring(0, nPos) + "/IDManage";
-            }
-            #endregion
-
             midAddressList = new List<MidAddress>();
             HttpHelper http = new HttpHelper();
             HttpItem item = new HttpItem()
@@ -518,6 +508,14 @@ namespace MOKA_Factory_Tools
             Stopwatch watch = new Stopwatch();
             watch.Start();
 
+            #region 新抄写接口预处理
+            // 逆序去除"IDManage",再拼接"n-admin"
+            int nPos = url.LastIndexOf('/');
+            if (nPos > 0)
+            {
+                url = url.Substring(0, nPos) + "/n-admin";
+            }
+            #endregion
             item.URL = url + "/bind/order";
             item.Postdata = string.Format("{{\"orderNum\":\"{0}\",\"sn\":\"{1}\",\"psn\":\"{2}\",\"orderCode\":\"{3}\"}}", order, sn, psn, firetv_device_code);
             HttpResult httpResult = http.GetHtml(item);
@@ -917,14 +915,6 @@ namespace MOKA_Factory_Tools
                 KeepAlive = false
             };
             item.PostEncoding = Encoding.UTF8;
-            #region 新抄写接口预处理
-            // 逆序去除第一个斜杠后的字符,再拼接"IDManage"
-            int nPos = url.LastIndexOf('/');
-            if (nPos > 0)
-            {
-                url = url.Substring(0, nPos) + "/IDManage";
-            }
-            #endregion
             item.URL = url;
             item.Postdata = content;
             System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();