|
@@ -367,17 +367,28 @@ namespace MOKA_Factory_Tools
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
public static bool GetMidAddress2(MidList midInfo, string order, SQLiteConnection sqliteConn, out List<MidAddress> midAddressList)
|
|
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>();
|
|
midAddressList = new List<MidAddress>();
|
|
HttpHelper http = new HttpHelper();
|
|
HttpHelper http = new HttpHelper();
|
|
HttpItem item = new HttpItem()
|
|
HttpItem item = new HttpItem()
|
|
{
|
|
{
|
|
- URL = midInfo.host + "/getofflinelist.do?",//URL这里都是测试URl 必需项
|
|
|
|
|
|
+ URL = url + "/getofflinelist.do?",//URL这里都是测试URl 必需项
|
|
Encoding = null,//编码格式(utf-8,gb2312,gbk) 可选项 默认类会自动识别
|
|
Encoding = null,//编码格式(utf-8,gb2312,gbk) 可选项 默认类会自动识别
|
|
//Encoding = Encoding.Default,
|
|
//Encoding = Encoding.Default,
|
|
Method = "post",//URL 可选项 默认为Get
|
|
Method = "post",//URL 可选项 默认为Get
|
|
Postdata = ("orderNumber=" + order + "&mac=" + HttpUtility.UrlEncode(TestMode.MAC)),
|
|
Postdata = ("orderNumber=" + order + "&mac=" + HttpUtility.UrlEncode(TestMode.MAC)),
|
|
KeepAlive = false
|
|
KeepAlive = false
|
|
};
|
|
};
|
|
|
|
+
|
|
item.ContentType = "application/x-www-form-urlencoded";
|
|
item.ContentType = "application/x-www-form-urlencoded";
|
|
HttpResult result = http.GetHtml(item);
|
|
HttpResult result = http.GetHtml(item);
|
|
string ParseText = result.Html;
|
|
string ParseText = result.Html;
|
|
@@ -425,7 +436,6 @@ namespace MOKA_Factory_Tools
|
|
MessageBox.Show("Fail to parse MIDAddress info\r\n " + ex.Message);
|
|
MessageBox.Show("Fail to parse MIDAddress info\r\n " + ex.Message);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|