designHelper.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  1. using BizCom;
  2. using Newtonsoft.Json;
  3. using NPOI.POIFS.Properties;
  4. using NPOI.SS.Formula.Functions;
  5. using SiteCore.Handler;
  6. using SiteCore.taoObj;
  7. using SQLData;
  8. using System;
  9. using System.Collections.Generic;
  10. using System.Collections.Specialized;
  11. using System.Data;
  12. using System.Linq;
  13. using System.Net;
  14. using System.Net.Http;
  15. using System.Reflection;
  16. using System.Runtime.Remoting.Messaging;
  17. using System.Runtime.Remoting.Metadata.W3cXsd2001;
  18. using System.Security.Policy;
  19. using System.Text;
  20. using System.Text.RegularExpressions;
  21. using System.Threading.Tasks;
  22. using System.Web;
  23. using static NHibernate.Linq.Visitors.LeftJoinDetector;
  24. using static SiteCore.taoObj.work_core_vo;
  25. namespace SiteCore.Handler
  26. {
  27. public class designHelper : BaseHandler, IHttpHandler
  28. {
  29. public void ProcessRequest(HttpContext context)
  30. {
  31. if (UrlParmsCheck("t"))
  32. {
  33. String tname = GetString("t");
  34. MethodInfo method;
  35. Type type = this.GetType();
  36. method = type.GetMethod(tname);
  37. con = context;
  38. if (method == null)
  39. {
  40. conError("找不到对应方法,服务器返回错误");
  41. return;
  42. }
  43. successFlag = false;
  44. context.Response.ContentType = "application/json";
  45. context.Response.Headers.Set("Access-Control-Allow-Origin", "*");
  46. try
  47. {
  48. method.Invoke(this, null);
  49. }
  50. catch (Exception ex)
  51. {
  52. conError("处理接口错误,服务器返回错误");
  53. }
  54. finally
  55. {
  56. }
  57. }
  58. }
  59. static string pUrl = "http://47.122.60.212:8181/api/originalOrder/";
  60. //static string pUrl = "http://47.122.40.91:8181/api/originalOrder/";
  61. static HttpHelper tb_http = new HttpHelper();
  62. public static designApiResponseVo API_GetPrintData_CreateOrder(CeErpTradeCell ceErpTradeCell, string post = "")
  63. {
  64. if (ceErpTradeCell.IsSample == 2)
  65. {
  66. return new designApiResponseVo(-1, "补差价订单不需要过设计系统");
  67. }
  68. string post_url = pUrl + "add";
  69. CeErpOrderFormData formData = null;
  70. if (post != "SysAdmin" && post != "Summarize")
  71. {
  72. if (!ceErpTradeCell.ctid.Contains("S_"))
  73. {
  74. formData = CeErpOrderFormData.GetByTid(ceErpTradeCell.ctid.ToString());
  75. if (formData == null)
  76. {
  77. return new designApiResponseVo(-1, "请填写订单的手机号或者微信号才可指派到设计系统");
  78. }
  79. }
  80. }
  81. designApiResponseVo response = commonHelper.checkOrderDesignInfo(ceErpTradeCell, post);
  82. if (response.code != 200)
  83. {
  84. return response;
  85. }
  86. WebClient wc = new WebClient();
  87. wc.Encoding = Encoding.GetEncoding("utf-8");
  88. //json参数
  89. NameValueCollection PostVars = getParams(ceErpTradeCell);
  90. if (ceErpTradeCell.CustomerUserId > 0)
  91. {
  92. string sql = "select top 1 Name,Mobile from view_ErpUser where ID = '" + ceErpTradeCell.CustomerUserId + "'";
  93. DataTable dt = DbHelper.DbConn.ExecuteDataset(sql).Tables[0];
  94. PostVars.Add("customerName", dt.Rows[0]["Name"].ToString());
  95. PostVars.Add("customerTel", dt.Rows[0]["Mobile"].ToString());
  96. }
  97. //{"msg":"推送成功","code":200,"success":true}
  98. string result = "";
  99. try
  100. {
  101. byte[] ret = wc.UploadValues(post_url, "POST", PostVars);
  102. string remoteInfo = Encoding.GetEncoding("utf-8").GetString(ret);
  103. response = JsonConvert.DeserializeObject<designApiResponseVo>(remoteInfo);
  104. result = "设计共创:失败-" + response.msg;
  105. if (response.code == 200)
  106. {
  107. result = "设计共创:成功";
  108. CeErpSukuraData.createInfo(ceErpTradeCell.ctid, 2);
  109. //commonHelper.updateDataTradeCellDesignInfo(ceErpTradeCell.ctid);
  110. }
  111. }
  112. catch (Exception ex)
  113. {
  114. XLog.SaveLog(0, "API_GetPrintData_CreateOrder:" + ex.Message);
  115. }
  116. return new designApiResponseVo(200, result);
  117. }
  118. public static designApiResponseVo API_update_order(CeErpTradeCell ceErpTradeCell)
  119. {
  120. string post_url = pUrl + "workCore";
  121. WebClient wc = new WebClient();
  122. wc.Encoding = Encoding.GetEncoding("utf-8");
  123. NameValueCollection PostVars = getParams(ceErpTradeCell);
  124. PostVars.Add("actionName", "orderRemarks");
  125. PostVars.Add("orderNumber", ceErpTradeCell.ctid);
  126. string result = "";
  127. try
  128. {
  129. byte[] ret = wc.UploadValues(post_url, "POST", PostVars);
  130. string remoteInfo = Encoding.GetEncoding("utf-8").GetString(ret);
  131. designApiResponseVo response = JsonConvert.DeserializeObject<designApiResponseVo>(remoteInfo);
  132. result = "设计共创:失败-" + response.msg;
  133. if (response.code == 200)
  134. {
  135. result = "设计共创:成功";
  136. CeErpSukuraData.createInfo(ceErpTradeCell.ctid, 2);
  137. //commonHelper.updateDataTradeCellDesignInfo(ceErpTradeCell.ctid);
  138. }
  139. }
  140. catch (Exception ex)
  141. {
  142. XLog.SaveLog(0, "API_GetPrintData_CreateOrder:" + ex.Message);
  143. }
  144. return new designApiResponseVo(200, result);
  145. }
  146. private static NameValueCollection getParams(CeErpTradeCell ceErpTradeCell)
  147. {
  148. Boolean isOldCustomerText = false;
  149. Boolean isReturn = false;
  150. Boolean isGai = false;
  151. if (ceErpTradeCell.IsOldCustomer == 1)
  152. {
  153. isOldCustomerText = true;
  154. }
  155. if (ceErpTradeCell.IsReturn > 0)
  156. {
  157. isReturn = true;
  158. }
  159. if (ceErpTradeCell.MemoOpt == 1)
  160. {
  161. isGai = true;
  162. }
  163. CeErpTrade ceErpTrade = CeErpTrade.Get(ceErpTradeCell.tid);
  164. CeErpShop ceErpShop = CeErpShop.Get(ceErpTradeCell.ShopId);
  165. CeErpTradeCellExtend ceErpTradeCellExtend = CeErpTradeCellExtend.getByTid(ceErpTradeCell.ctid);
  166. //Dictionary<string, object> dataDic = ToDictionary(ro_json);
  167. //string urlData = ToUrlParams(dataDic);
  168. //string sql_pay = "INSERT INTO CE_ErpToDesignLog (ctid, ctime) VALUES ('" + ceErpTradeCell.ctid + "', '" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
  169. //CeErpTradeCell.ExecuteNonQuery(sql_pay.ToString());
  170. NameValueCollection PostVars = new NameValueCollection();
  171. PostVars.Add("outId", ceErpTradeCell.ID.ToString());
  172. PostVars.Add("productId", ceErpTradeCell.ProductId.ToString());
  173. PostVars.Add("payment", ceErpTradeCell.payment.ToString());
  174. PostVars.Add("isUrgent", ceErpTradeCell.IsUrgency.ToString());
  175. PostVars.Add("customerMemo", ceErpTradeCell.CustomerMemo);
  176. PostVars.Add("shopName", ceErpShop.ShopName);
  177. PostVars.Add("buyerNick", ceErpTrade.buyer_nick != "" ? ceErpTrade.buyer_nick : "lingtao");
  178. PostVars.Add("receiverName", ceErpTrade.receiver_name);
  179. PostVars.Add("receiverMobile", ceErpTrade.receiver_mobile);
  180. PostVars.Add("receiverState", ceErpTrade.receiver_state);
  181. PostVars.Add("receiverCity", ceErpTrade.receiver_city);
  182. PostVars.Add("receiverDistrict", ceErpTrade.receiver_district);
  183. PostVars.Add("receiverAddress", ceErpTrade.receiver_address);
  184. PostVars.Add("tids", ceErpTradeCell.ctid);
  185. PostVars.Add("isOldUser", isOldCustomerText.ToString());
  186. PostVars.Add("sellerMemo", ceErpTradeCell.seller_memo);
  187. PostVars.Add("orderRemarks", ceErpTradeCell.seller_memo);
  188. PostVars.Add("isChange", isGai.ToString());
  189. PostVars.Add("isBack", isReturn.ToString());
  190. PostVars.Add("tid", ceErpTradeCell.tid);
  191. PostVars.Add("isDianziOrder", ceErpTradeCell.isDianziOrder.ToString());
  192. PostVars.Add("orderUnique", ceErpTradeCell.OrderSn);
  193. PostVars.Add("ptid", ceErpTradeCell.ptid);
  194. PostVars.Add("SplitTag", ceErpTradeCell.SplitTag);
  195. PostVars.Add("remarkSign", ceErpTradeCell.MemoOpt.ToString());
  196. PostVars.Add("otherMemo", ceErpTradeCell.OtherMemo);
  197. PostVars.Add("parentSplitNo", ceErpTradeCell.ParentSplitNo);
  198. if (ceErpTradeCellExtend != null)
  199. {
  200. PostVars.Add("productFirName", ceErpTradeCellExtend.cate1);/// 分类1
  201. PostVars.Add("productFirId", ceErpTradeCellExtend.cate1Id);/// 分类id
  202. PostVars.Add("productSecName", ceErpTradeCellExtend.cate2);/// 分类2
  203. PostVars.Add("productSecId", ceErpTradeCellExtend.cate2Id);/// 分类id
  204. PostVars.Add("productThirdId", ceErpTradeCellExtend.cate3Id);/// 分类id
  205. PostVars.Add("sceneName", ceErpTradeCellExtend.scene); /// 场景
  206. PostVars.Add("sceneId", ceErpTradeCellExtend.sceneId); /// 场景id
  207. PostVars.Add("productSizeW", ceErpTradeCellExtend.length.ToString()); /// 长
  208. PostVars.Add("productSizeH", ceErpTradeCellExtend.height.ToString()); /// 高
  209. PostVars.Add("productSizeL", ceErpTradeCellExtend.width.ToString()); /// 宽
  210. PostVars.Add("productCraftName", ceErpTradeCellExtend.craft); /// 工艺
  211. PostVars.Add("offerAmount", ceErpTradeCellExtend.offerAmount.ToString()); /// 报价金额
  212. PostVars.Add("styleCount", ceErpTradeCellExtend.numbers.ToString()); /// 款数
  213. PostVars.Add("materialName", ceErpTradeCellExtend.material); /// 材质
  214. PostVars.Add("materialId", ceErpTradeCellExtend.materialId); /// 材质id
  215. PostVars.Add("stylePricing", ceErpTradeCellExtend.numberType); /// 多款类型
  216. PostVars.Add("productSceneName", ceErpTradeCellExtend.typeScene); /// 品类场景
  217. PostVars.Add("productSceneId", ceErpTradeCellExtend.typeSceneId); /// 品类场景id
  218. PostVars.Add("opScene", ceErpTradeCellExtend.opScene); /// 运营场景
  219. PostVars.Add("opSceneId", ceErpTradeCellExtend.opSceneId); /// 运营场景id
  220. PostVars.Add("quantity", ceErpTradeCellExtend.quantity.ToString()); /// 数量
  221. PostVars.Add("productUnit", ceErpTradeCellExtend.numberUnit); /// 数量单位
  222. PostVars.Add("spuId", ceErpTradeCellExtend.spu_id); /// spuid
  223. PostVars.Add("recSize", ceErpTradeCellExtend.recSize); /// 推荐尺寸
  224. PostVars.Add("productSizeUnit", ceErpTradeCellExtend.sizeUnit); /// 尺寸单位
  225. PostVars.Add("orderFrom", ceErpTradeCellExtend.orderFrom.ToString()); /// 【订单来源】"10":第三方平台"15":私域电商"20":ERP"30":售前系统
  226. PostVars.Add("orderType", ceErpTradeCellExtend.orderType.ToString()); /// 【订单类型】"10":线上单"15":线下单"20":补差单"30":售后单
  227. PostVars.Add("discountAmount", ceErpTradeCellExtend.discountAmount.ToString());//折扣金额
  228. PostVars.Add("differentAmount", ceErpTradeCellExtend.differentAmount.ToString());//补差金额
  229. PostVars.Add("differentSplitNo", ceErpTradeCellExtend.differentSplitNo);//补差识别号
  230. }
  231. return PostVars;
  232. }
  233. /**
  234. *actionName:
  235. * followRemarks 跟单备注
  236. * orderRemarks 修改订单备注
  237. * rebutDesign 下单部打回设计单
  238. * afterDesign 售后设计单
  239. * changeDesign 改稿/定稿/加急
  240. * remarkSign 1改稿2定稿3加急
  241. * closeDesign 关闭订单
  242. * resetDesign 重置订单
  243. * packageDesign 顺丰状态
  244. * finishDesign 顺丰状态
  245. * approveDesign 下单部通过
  246. **/
  247. public static void API_WorkCore(string orderNumber, string actionName, string orderRemarks = "", int remarkSign = 0, string reasonRemarks = "", string isSf = "", int demandExamine = 0)
  248. {
  249. string post_url = pUrl + "workCore";
  250. WebClient wc = new WebClient();
  251. wc.Encoding = Encoding.GetEncoding("utf-8");
  252. NameValueCollection PostVars = new NameValueCollection();
  253. PostVars.Add("orderNumber", orderNumber);
  254. PostVars.Add("actionName", actionName);
  255. if (remarkSign > 0)
  256. {
  257. PostVars.Add("remarkSign", remarkSign.ToString());
  258. }
  259. if (orderRemarks != "")
  260. {
  261. PostVars.Add("orderRemarks", orderRemarks);
  262. }
  263. if (reasonRemarks != "")
  264. {
  265. PostVars.Add("reasonRemarks", reasonRemarks);
  266. }
  267. if (isSf != "")
  268. {
  269. PostVars.Add("packageSign", isSf);
  270. }
  271. if (demandExamine != 0)
  272. {
  273. PostVars.Add("demandExamine", demandExamine.ToString());
  274. }
  275. string remoteInfo = "";
  276. try
  277. {
  278. byte[] ret = wc.UploadValues(post_url, "POST", PostVars);
  279. remoteInfo = Encoding.GetEncoding("utf-8").GetString(ret);
  280. }
  281. catch (Exception ex)
  282. {
  283. XLog.SaveLog(0, "API_WorkCore:" + ex.Message);
  284. }
  285. }
  286. /**
  287. *actionName:
  288. * followRemarks 跟单备注
  289. * orderRemarks 修改订单备注
  290. * rebutDesign 下单部打回设计单
  291. * afterDesign 售后设计单
  292. * changeDesign 改稿/定稿/加急
  293. * remarkSign 1改稿2定稿3加急
  294. * closeDesign 关闭订单
  295. * resetDesign 重置订单
  296. * packageDesign 顺丰状态
  297. * finishDesign 上传设计
  298. * repairDesign 补差金额
  299. * approveDesign 下单部通过
  300. * afterOver 售后结束
  301. **/
  302. public static void API_WorkCore(ApiVo vo)
  303. {
  304. string post_url = pUrl + "workCore";
  305. WebClient wc = new WebClient();
  306. wc.Encoding = Encoding.GetEncoding("utf-8");
  307. NameValueCollection PostVars = new NameValueCollection();
  308. PostVars.Add("orderNumber", vo.orderNumber);
  309. PostVars.Add("actionName", vo.actionName);
  310. PostVars.Add("isDesign", vo.isDesign.ToString());
  311. PostVars.Add("isOriginal", vo.isOriginal.ToString());
  312. if (vo.remarkSign > 0)
  313. {
  314. PostVars.Add("remarkSign", vo.remarkSign.ToString());
  315. }
  316. if (vo.orderRemarks != "")
  317. {
  318. PostVars.Add("orderRemarks", vo.orderRemarks);
  319. }
  320. if (vo.reasonRemarks != "")
  321. {
  322. PostVars.Add("reasonRemarks", vo.reasonRemarks);
  323. }
  324. if (vo.isSf != "")
  325. {
  326. PostVars.Add("packageSign", vo.isSf);
  327. }
  328. if (vo.demandExamine != 0)
  329. {
  330. PostVars.Add("demandExamine", vo.demandExamine.ToString());
  331. }
  332. if (vo.payment != 0)
  333. {
  334. PostVars.Add("payment", vo.payment.ToString());
  335. }
  336. if (vo.designFree != 0)
  337. {
  338. PostVars.Add("designFree", vo.designFree.ToString());
  339. }
  340. if (vo.responsibleId != 0)
  341. {
  342. PostVars.Add("responsibleId", vo.responsibleId.ToString());
  343. }
  344. if (!string.IsNullOrEmpty(vo.afterFiles))
  345. {
  346. PostVars.Add("afterFiles", vo.afterFiles);
  347. }
  348. string remoteInfo = "";
  349. try
  350. {
  351. byte[] ret = wc.UploadValues(post_url, "POST", PostVars);
  352. remoteInfo = Encoding.GetEncoding("utf-8").GetString(ret);
  353. if ("orderRemarks".Equals(vo.actionName))
  354. {
  355. XLog.SaveLog(0, "API_WorkCore:" + remoteInfo + vo.actionName);
  356. }
  357. }
  358. catch (Exception ex)
  359. {
  360. XLog.SaveLog(0, "API_WorkCore:" + ex.Message);
  361. }
  362. }
  363. public static void api_approveDesign(string orderNumber)
  364. {
  365. string post_url = pUrl + "approveDesign";
  366. WebClient wc = new WebClient();
  367. wc.Encoding = Encoding.GetEncoding("utf-8");
  368. NameValueCollection PostVars = new NameValueCollection();
  369. PostVars.Add("orderNumber", orderNumber);
  370. string remoteInfo = "";
  371. try
  372. {
  373. byte[] ret = wc.UploadValues(post_url, "POST", PostVars);
  374. remoteInfo = Encoding.GetEncoding("utf-8").GetString(ret);
  375. }
  376. catch (Exception ex)
  377. {
  378. XLog.SaveLog(0, "api_approveDesign:" + ex.Message);
  379. }
  380. }
  381. /**
  382. *actionName:
  383. * refundIng 退款申请
  384. * refundEd 已退款
  385. * refundCancel 取消退款
  386. **/
  387. public static void API_refundOrder(string orderNumber, string actionName, string remark)
  388. {
  389. string post_url = pUrl + "refundOrder";
  390. WebClient wc = new WebClient();
  391. wc.Encoding = Encoding.GetEncoding("utf-8");
  392. NameValueCollection PostVars = new NameValueCollection();
  393. PostVars.Add("orderNumber", orderNumber);
  394. PostVars.Add("actionName", actionName);
  395. PostVars.Add("orderRemarks", remark);
  396. string remoteInfo = "";
  397. try
  398. {
  399. byte[] ret = wc.UploadValues(post_url, "POST", PostVars);
  400. remoteInfo = Encoding.GetEncoding("utf-8").GetString(ret);
  401. }
  402. catch (Exception ex)
  403. {
  404. XLog.SaveLog(0, "API_refundOrder:" + ex.Message);
  405. }
  406. }
  407. public static string API_GetPrintData_Refund(CeErpTradeCell ceErpTradeCell)
  408. {
  409. string post_url = pUrl + "refund";
  410. //json参数
  411. List<string> postLst = new List<string>();
  412. Boolean isOldCustomerText = false;
  413. Boolean isReturn = false;
  414. Boolean isGai = false;
  415. if (ceErpTradeCell.IsOldCustomer == 1)
  416. {
  417. isOldCustomerText = true;
  418. }
  419. if (ceErpTradeCell.IsReturn > 0)
  420. {
  421. isReturn = true;
  422. }
  423. if (ceErpTradeCell.MemoOpt == 1)
  424. {
  425. isGai = true;
  426. }
  427. CeErpTrade ceErpTrade = CeErpTrade.Get(ceErpTradeCell.tid);
  428. CeErpShop ceErpShop = CeErpShop.Get(ceErpTradeCell.ShopId);
  429. var res_obj = new
  430. {
  431. outId = ceErpTradeCell.ID,
  432. productId = ceErpTradeCell.ProductId,
  433. payment = ceErpTradeCell.payment,
  434. isUrgent = ceErpTradeCell.IsUrgency,
  435. customerMemo = ceErpTradeCell.CustomerMemo,
  436. shopName = ceErpShop.ShopName,
  437. buyerNick = ceErpTrade.buyer_nick != "" ? ceErpTrade.buyer_nick : "lingtao",
  438. receiverName = ceErpTrade.receiver_name,
  439. receiverMobile = ceErpTrade.receiver_mobile,
  440. receiverState = ceErpTrade.receiver_state,
  441. receiverCity = ceErpTrade.receiver_city,
  442. receiverDistrict = ceErpTrade.receiver_district,
  443. receiverAddress = ceErpTrade.receiver_address,
  444. tids = ceErpTradeCell.ctid,
  445. isOldUser = isOldCustomerText,
  446. sellerMemo = ceErpTradeCell.seller_memo,
  447. isChange = isGai,
  448. isBack = isReturn,
  449. tid = ceErpTradeCell.tid
  450. };
  451. string ro_json = JsonConvert.SerializeObject(res_obj);
  452. //;***************************************************
  453. ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
  454. HttpItem item = new HttpItem()
  455. {
  456. URL = post_url,
  457. Method = "POST",
  458. Postdata = ro_json
  459. };
  460. item.PostEncoding = Encoding.UTF8;
  461. HttpResult hResult = tb_http.GetHtml(item);
  462. return hResult.Html;
  463. }
  464. public static string API_GetPrintData_ModifyOrder(string tid, string seller_memo, Boolean isGai, Boolean isReturn, string returnReason = "")
  465. {
  466. string post_url = pUrl + "modify";
  467. //json参数
  468. List<string> postLst = new List<string>();
  469. CeErpTradeCell ceErpTradeCell = CeErpTradeCell.GetByCtid(tid);
  470. CeErpShop ceErpShop = null;
  471. if (ceErpTradeCell != null)
  472. {
  473. ceErpShop = CeErpShop.Get(ceErpTradeCell.ShopId);
  474. }
  475. var res_obj = new
  476. {
  477. outId = tid,
  478. orderText = seller_memo,
  479. isChange = isGai,
  480. isBack = isReturn,
  481. returnReason = returnReason,
  482. };
  483. string ro_json = JsonConvert.SerializeObject(res_obj);
  484. //***************************************************
  485. ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
  486. HttpItem item = new HttpItem()
  487. {
  488. URL = post_url,
  489. Method = "POST",
  490. Postdata = ro_json
  491. };
  492. item.PostEncoding = Encoding.UTF8;
  493. HttpResult hResult = tb_http.GetHtml(item);
  494. return hResult.Html;
  495. }
  496. }
  497. }