public static string method_307(CmsForm cmsForm, string content) { string string96; try { CouponBean couponBean = new CouponBean(); SendUtil.method_308(cmsForm, content, couponBean); if (!"".Equals(couponBean.uland_url)) { if (!SendUtil.method_138(cmsForm, couponBean.uland_url)) { string str = StringUtil.subString(couponBean.uland_url, 0, "activityId=", "&"); string str1 = StringUtil.subString(couponBean.uland_url, 0, "itemId=", "&"); string out_log = ""; ArrayList arrayLists = AlimamaUtil.smethod_17(str1, "1", out out_log); if ((arrayLists == null ? false : arrayLists.Count != 0)) { GoodsItem item = (GoodsItem)arrayLists[0]; string str2 = "优惠券:http://shop.m.taobao.com/shop/coupon.htm?activityId={activityId}&sellerId={sellerId}<BR>下单:http://item.taobao.com/item.htm?id={itemId}"; str2 = str2.Replace("{activityId}", str).Replace("{sellerId}", item.num_iid).Replace("{itemId}", str1); content = couponBean.content.Replace("{couponItemUrl}", str2); } else { LogUtil.log_call(cmsForm, "2合1链接出错!"); string96 = null; return(string96); } } else { string96 = content; return(string96); } } string96 = content; } catch (Exception exception) { LogUtil.log_call(cmsForm, string.Concat("[parseCouponItemContentUrl]出错:", exception.ToString())); string96 = null; } return(string96); }
public static void method_308(CmsForm cmsForm, string string_96, CouponBean couponBean) { try { string_96 = SendUtil.method_144(cmsForm, string_96); string_96 = string_96.Replace("</span>", "</SPAN>").Replace("</div>", "</DIV>").Replace("<img", "<IMG").Replace("\n", "").Replace("\r", "").Replace("<br>", "\n").Replace("<BR>", "\n").Replace("<BR", "\n<BR").Replace("</DIV>", "\n").Replace("</SPAN>", "\n").Replace("</P>", "\n").Replace("</p>", "\n"); //string_96 = .ᜄ(string_96); SendUtil.method_309(cmsForm, SendUtil.method_142(string_96), couponBean, 3); string_96 = SendUtil.method_143(cmsForm, string_96); string_96 = string_96.Replace("{image}", "<IMG src=\"").Replace("{/image}", "\">"); string_96 = string_96.Replace("\n", "<BR>"); couponBean.content = string_96; } catch (Exception exception) { LogUtil.log_call(cmsForm, string.Concat("[transCouponItemCmbToTwo]出错:", exception.ToString())); } }
public static void method_309(CmsForm cmsForm, string content, CouponBean couponBean, int int_28) { try { content = content.Replace(" ", " ").Replace("&", "&"); foreach (Match match in (new Regex(Constants.regex_url)).Matches(content)) { string str = match.Value.ToString(); if (!str.Contains("uland.taobao.com")) { string str1 = TaobaoUtil.get_redirect_url(str, str); if (str1.Contains("uland.taobao.com")) { couponBean.uland_url = str1; } Thread.Sleep(200); } else { couponBean.uland_url = str; } } } catch (Exception exception1) { Exception exception = exception1; if ((!exception.ToString().Contains("System.Net.WebException") ? true : int_28 >= 5)) { LogUtil.log_call(cmsForm, string.Concat("[checkCouponAndItemCmbUrl]出错:", exception.ToString())); } else { LogUtil.log_call(cmsForm, "网络一时问题,正在重试。。。。"); Thread.Sleep(1200); int_28++; SendUtil.method_309(cmsForm, content, couponBean, int_28); } } }