public string GoodGroupJson(HttpContext context) { Hi_Json_GoodGourpContent content = new Hi_Json_GoodGourpContent { showPrice = (context.Request.Form["ShowPrice"] != null) ? Convert.ToBoolean(context.Request.Form["ShowPrice"]) : true, layout = (context.Request.Form["Layout"] != null) ? Convert.ToInt32(context.Request.Form["Layout"]) : 1, showName = (context.Request.Form["showName"] != null) ? Convert.ToBoolean(Convert.ToInt32(context.Request.Form["showName"])) : true, showIco = (context.Request.Form["ShowIco"] != null) ? Convert.ToBoolean(context.Request.Form["ShowIco"]) : true, showMaketPrice = true }; string str = (context.Request.Form["IDs"] != null) ? context.Request.Form["IDs"] : ""; List <HiShop_Model_Good> list = new List <HiShop_Model_Good>(); if (!string.IsNullOrEmpty(str)) { foreach (ProductInfo info in this.GetGoods(context, str)) { HiShop_Model_Good item = new HiShop_Model_Good { item_id = info.ProductId.ToString(), title = info.ProductName.ToString(), price = Convert.ToDouble(info.MinShowPrice).ToString("f2"), original_price = Convert.ToDouble(info.MarketPrice).ToString("f2"), link = Globals.GetWebUrlStart() + "/ProductDetails.aspx?productId=" + info.ProductId.ToString(), pic = info.ThumbnailUrl310.ToString() }; list.Add(item); } } content.goodslist = list; return(JsonConvert.SerializeObject(content)); }
public string GoodGroupJson(HttpContext context) { Hi_Json_GoodGourpContent content = new Hi_Json_GoodGourpContent(); content.showPrice = context.Request.Form["ShowPrice"] != null?Convert.ToBoolean(context.Request.Form["ShowPrice"]) : true; content.layout = context.Request.Form["Layout"] != null?Convert.ToInt32(context.Request.Form["Layout"]) : 1; content.showName = context.Request.Form["showName"] != null?Convert.ToBoolean(Convert.ToInt32(context.Request.Form["showName"])) : true; content.showIco = context.Request.Form["ShowIco"] != null?Convert.ToBoolean(context.Request.Form["ShowIco"]) : true; string str = context.Request.Form["IDs"] != null ? context.Request.Form["IDs"] : ""; List <HiShop_Model_Good> list = new List <HiShop_Model_Good>(); if (!string.IsNullOrEmpty(str)) { foreach (ProductInfo info in this.GetGoods(context, str)) { HiShop_Model_Good item = new HiShop_Model_Good(); item.item_id = info.ProductId.ToString(); item.title = info.ProductName.ToString(); item.price = Convert.ToDouble(info.MinShowPrice).ToString("f2"); item.original_price = Convert.ToDouble(info.MarketPrice).ToString("f2"); item.link = string.Concat(new object[] { "http://", Globals.DomainName, ":", HttpContext.Current.Request.Url.Port, "/ProductDetails.aspx?productId=", info.ProductId.ToString(), "&wid=", this.wid }); item.pic = info.ThumbnailUrl310.ToString(); list.Add(item); } } content.goodslist = list; return(JsonConvert.SerializeObject(content)); }
public string GoodGroupJson(HttpContext context) { Hi_Json_GoodGourpContent content = new Hi_Json_GoodGourpContent { showPrice = (context.Request.Form["ShowPrice"] != null) ? Convert.ToBoolean(context.Request.Form["ShowPrice"]) : true, layout = (context.Request.Form["Layout"] != null) ? Convert.ToInt32(context.Request.Form["Layout"]) : 1, showName = (context.Request.Form["showName"] != null) ? Convert.ToBoolean(context.Request.Form["showName"]) : true, showIco = (context.Request.Form["ShowIco"] != null) ? Convert.ToBoolean(context.Request.Form["ShowIco"]) : true, goodsize = (context.Request.Form["GoodListSize"] != null) ? Convert.ToInt32(context.Request.Form["GoodListSize"]) : 6, showMaketPrice = (context.Request.Form["ShowMaketPrice"] != null) ? Convert.ToBoolean(context.Request.Form["ShowMaketPrice"]) : true }; content.secondPriority = ((Globals.RequestFormStr("SecondPriority").Trim() != "") ? Convert.ToInt32(context.Request.Form["SecondPriority"]) : 3); List <HiShop_Model_Good> list = new List <HiShop_Model_Good>(); DataTable goods = this.GetGoods(context); for (int i = 0; i < goods.Rows.Count; i++) { HiShop_Model_Good item = new HiShop_Model_Good { item_id = goods.Rows[i]["ProductId"].ToString(), title = goods.Rows[i]["ProductName"].ToString(), price = Convert.ToDouble(goods.Rows[i]["MinShowPrice"]).ToString("f2"), original_price = Convert.ToDouble(goods.Rows[i]["MarketPrice"]).ToString("f2"), link = Globals.GetWebUrlStart() + "/ProductDetails.aspx?productId=" + goods.Rows[i]["ProductId"].ToString(), pic = goods.Rows[i]["ThumbnailUrl310"].ToString() }; list.Add(item); } content.goodslist = list; return(JsonConvert.SerializeObject(content)); }
public string GoodGroupJson(HttpContext context) { Hi_Json_GoodGourpContent content = new Hi_Json_GoodGourpContent(); content.showPrice = context.Request.Form["ShowPrice"] != null?Convert.ToBoolean(context.Request.Form["ShowPrice"]) : true; content.layout = context.Request.Form["Layout"] != null?Convert.ToInt32(context.Request.Form["Layout"]) : 1; content.showName = context.Request.Form["showName"] != null?Convert.ToBoolean(context.Request.Form["showName"]) : true; content.showIco = context.Request.Form["ShowIco"] != null?Convert.ToBoolean(context.Request.Form["ShowIco"]) : true; content.goodsize = context.Request.Form["GoodListSize"] != null?Convert.ToInt32(context.Request.Form["GoodListSize"]) : 6; List <HiShop_Model_Good> list = new List <HiShop_Model_Good>(); DataTable goods = this.GetGoods(context); for (int i = 0; i < goods.Rows.Count; i++) { HiShop_Model_Good item = new HiShop_Model_Good(); item.item_id = goods.Rows[i]["ProductId"].ToString(); item.title = goods.Rows[i]["ProductName"].ToString(); item.price = Convert.ToDouble(goods.Rows[i]["MinShowPrice"]).ToString("f2"); item.original_price = Convert.ToDouble(goods.Rows[i]["MarketPrice"]).ToString("f2"); item.link = string.Concat(new object[] { "http://", Globals.DomainName, ":", HttpContext.Current.Request.Url.Port, "/ProductDetails.aspx?productId=", goods.Rows[i]["ProductId"].ToString(), "&wid=", this.wid }); item.pic = goods.Rows[i]["ThumbnailUrl310"].ToString(); list.Add(item); } content.goodslist = list; return(JsonConvert.SerializeObject(content)); }
public Hi_Json_GoodGourpContent GoodGroupJson() { Hi_Json_GoodGourpContent hi_Json_GoodGourpContent = new Hi_Json_GoodGourpContent(); try { hi_Json_GoodGourpContent.showPrice = (string.IsNullOrEmpty(base.ShowPrice) || Convert.ToBoolean(base.ShowPrice)); hi_Json_GoodGourpContent.layout = (string.IsNullOrEmpty(base.Layout) ? 1 : Convert.ToInt32(base.Layout)); hi_Json_GoodGourpContent.showName = (string.IsNullOrEmpty(base.ShowName) || Convert.ToBoolean(base.ShowName)); hi_Json_GoodGourpContent.showIco = (string.IsNullOrEmpty(base.ShowIco) || Convert.ToBoolean(base.ShowIco)); hi_Json_GoodGourpContent.goodsize = ((!string.IsNullOrEmpty(this.GoodListSize)) ? Convert.ToInt32(this.GoodListSize) : 6); bool flag = !string.IsNullOrEmpty(this.IsApp) && this.IsApp.ToBool(); List <HiShop_Model_Good> list = new List <HiShop_Model_Good>(); DataTable goods = this.GetGoods(this.CategoryId.ToInt(0)); for (int i = 0; i < goods.Rows.Count; i++) { HiShop_Model_Good hiShop_Model_Good = new HiShop_Model_Good(); hiShop_Model_Good.item_id = goods.Rows[i]["ProductId"].ToString(); hiShop_Model_Good.title = goods.Rows[i]["ProductName"].ToString(); hiShop_Model_Good.price = goods.Rows[i]["SalePrice"].ToDecimal(0).F2ToString("f2"); hiShop_Model_Good.productType = Convert.ToInt32(goods.Rows[i]["ProductType"]); hiShop_Model_Good.original_price = goods.Rows[i]["MarketPrice"].ToDecimal(0).F2ToString("f2"); if (flag) { hiShop_Model_Good.link = "javascript:showProductDetail(" + goods.Rows[i]["ProductId"].ToString() + ")"; } else if (hiShop_Model_Good.productType == 1) { hiShop_Model_Good.link = "ServiceProductDetails?productId=" + goods.Rows[i]["ProductId"].ToString(); } else { hiShop_Model_Good.link = "ProductDetails?productId=" + goods.Rows[i]["ProductId"].ToString(); } if (string.IsNullOrEmpty(goods.Rows[i]["ThumbnailUrl40"].ToString())) { hiShop_Model_Good.pic = SettingsManager.GetMasterSettings().DefaultProductImage; } else { hiShop_Model_Good.pic = goods.Rows[i]["ThumbnailUrl410"].ToString(); } list.Add(hiShop_Model_Good); } hi_Json_GoodGourpContent.goodslist = list; } catch (Exception) { } return(hi_Json_GoodGourpContent); }
public Hi_Json_GoodGourpContent GoodGroupJson() { Hi_Json_GoodGourpContent hi_Json_GoodGourpContent = new Hi_Json_GoodGourpContent(); hi_Json_GoodGourpContent.showPrice = (string.IsNullOrEmpty(base.ShowPrice) || Convert.ToBoolean(base.ShowPrice)); hi_Json_GoodGourpContent.layout = (string.IsNullOrEmpty(base.Layout) ? 1 : Convert.ToInt32(base.Layout)); hi_Json_GoodGourpContent.showName = (string.IsNullOrEmpty(base.ShowName) || base.ShowName.ToBool()); hi_Json_GoodGourpContent.showIco = (string.IsNullOrEmpty(base.ShowIco) || Convert.ToBoolean(base.ShowIco)); string text = (!string.IsNullOrEmpty(this.IDs)) ? this.IDs : ""; bool flag = !string.IsNullOrEmpty(base.IsApp) && base.IsApp.ToBool(); List <HiShop_Model_Good> list = new List <HiShop_Model_Good>(); if (!string.IsNullOrEmpty(text)) { DataTable topProductByIds = ProductHelper.GetTopProductByIds(text); for (int i = 0; i < topProductByIds.Rows.Count; i++) { HiShop_Model_Good hiShop_Model_Good = new HiShop_Model_Good(); hiShop_Model_Good.item_id = topProductByIds.Rows[i]["ProductId"].ToString(); hiShop_Model_Good.title = topProductByIds.Rows[i]["ProductName"].ToString(); hiShop_Model_Good.price = topProductByIds.Rows[i]["SalePrice"].ToDecimal(0).F2ToString("f2"); hiShop_Model_Good.original_price = topProductByIds.Rows[i]["MarketPrice"].ToDecimal(0).F2ToString("f2"); if (flag) { hiShop_Model_Good.link = "javascript:showProductDetail(" + topProductByIds.Rows[i]["ProductId"].ToString() + ")"; } else if (topProductByIds.Rows[i]["ProductType"].ToInt(0) == 1.GetHashCode()) { hiShop_Model_Good.link = "ServiceProductDetails.aspx?productId=" + topProductByIds.Rows[i]["ProductId"].ToString(); } else { hiShop_Model_Good.link = "ProductDetails.aspx?productId=" + topProductByIds.Rows[i]["ProductId"].ToString(); } if (string.IsNullOrEmpty(topProductByIds.Rows[i]["ThumbnailUrl410"].ToString())) { hiShop_Model_Good.pic = SettingsManager.GetMasterSettings().DefaultProductImage; } else { hiShop_Model_Good.pic = topProductByIds.Rows[i]["ThumbnailUrl410"].ToString(); } list.Add(hiShop_Model_Good); } } hi_Json_GoodGourpContent.goodslist = list; return(hi_Json_GoodGourpContent); }
public string GoodGroupJson(HttpContext context) { Hi_Json_GoodGourpContent hi_Json_GoodGourpContent = new Hi_Json_GoodGourpContent(); hi_Json_GoodGourpContent.showPrice = (context.Request.Form["ShowPrice"] == null || Convert.ToBoolean(context.Request.Form["ShowPrice"])); hi_Json_GoodGourpContent.layout = ((context.Request.Form["Layout"] == null) ? 1 : Convert.ToInt32(context.Request.Form["Layout"])); hi_Json_GoodGourpContent.showName = (context.Request.Form["showName"] == null || Convert.ToBoolean(Convert.ToInt32(context.Request.Form["showName"]))); hi_Json_GoodGourpContent.showIco = (context.Request.Form["ShowIco"] == null || Convert.ToBoolean(context.Request.Form["ShowIco"])); string text = (context.Request.Form["IDs"] != null) ? context.Request.Form["IDs"] : ""; bool flag = context.Request.Form["IsApp"] != null && context.Request.Form["IsApp"].ToBool(); List <HiShop_Model_Good> list = new List <HiShop_Model_Good>(); if (!string.IsNullOrEmpty(text)) { DataTable goods = this.GetGoods(text); for (int i = 0; i < goods.Rows.Count; i++) { HiShop_Model_Good hiShop_Model_Good = new HiShop_Model_Good(); hiShop_Model_Good.item_id = goods.Rows[i]["ProductId"].ToString(); hiShop_Model_Good.title = goods.Rows[i]["ProductName"].ToString(); hiShop_Model_Good.price = goods.Rows[i]["SalePrice"].ToDecimal(0).F2ToString("f2"); hiShop_Model_Good.original_price = goods.Rows[i]["MarketPrice"].ToDecimal(0).F2ToString("f2"); if (flag) { hiShop_Model_Good.link = "javascript:showProductDetail(" + goods.Rows[i]["ProductId"].ToString() + ")"; } else { hiShop_Model_Good.link = "ProductDetails.aspx?productId=" + goods.Rows[i]["ProductId"].ToString(); } if (string.IsNullOrEmpty(goods.Rows[i]["ThumbnailUrl310"].ToString())) { hiShop_Model_Good.pic = SettingsManager.GetMasterSettings().DefaultProductImage; } else { hiShop_Model_Good.pic = goods.Rows[i]["ThumbnailUrl310"].ToString(); } list.Add(hiShop_Model_Good); } } hi_Json_GoodGourpContent.goodslist = list; return(JsonConvert.SerializeObject(hi_Json_GoodGourpContent)); }
private string WriteTemplate(Hi_Json_GoodGourpContent model) { string text = "¥"; StringBuilder stringBuilder = new StringBuilder(""); if (model.layout == 1) { stringBuilder.Append("<div class=\"members_con\">"); stringBuilder.Append("<section class=\"members_goodspic\"><ul>"); if (model.goodslist.Count > 0) { for (int i = 0; i < model.goodslist.Count; i++) { HiShop_Model_Good hiShop_Model_Good = model.goodslist[i]; stringBuilder.AppendFormat("<li class=\"mingoods\"><div class=\"b_mingoods_wrapper\"><a href=\"{0}\"><img data-url=\"{1}\" width=\"100%\"></a>", hiShop_Model_Good.link, hiShop_Model_Good.pic); if (model.showName) { stringBuilder.AppendFormat("<a class=\"ptitle\" href=\"{0}\"> {1} </a>", hiShop_Model_Good.link, hiShop_Model_Good.title); } if (model.showIco || model.showPrice) { stringBuilder.Append("<span class=\"replace\">"); if (model.showIco) { stringBuilder.Append("<i class=\"btnAddToCart\" productid=\"" + hiShop_Model_Good.item_id + "\"></i>"); } if (model.showPrice) { stringBuilder.Append(text + hiShop_Model_Good.price); if (hiShop_Model_Good.original_price.ToDecimal(0) > decimal.Zero) { stringBuilder.AppendFormat("<span class=\"original_price\"><s>¥ {0}</s></span>", hiShop_Model_Good.original_price); } } stringBuilder.Append("</span>"); } stringBuilder.Append(" </div></li>"); } } stringBuilder.Append("</ul></section>"); stringBuilder.Append("</div>"); } else if (model.layout == 2) { stringBuilder.Append("<div class=\"members_con\">"); stringBuilder.Append("<section class=\"members_goodspic\"><ul>"); if (model.goodslist.Count > 0) { for (int j = 0; j < model.goodslist.Count; j++) { HiShop_Model_Good hiShop_Model_Good2 = model.goodslist[j]; stringBuilder.AppendFormat("<li class=\"biggoods\"><a class=\"goodsimg\" href=\"{0}\"><img data-url=\"{1}\" width=\"100%\"></a>", hiShop_Model_Good2.link, hiShop_Model_Good2.pic); if (model.showName || model.showPrice) { stringBuilder.Append("<section class=\"members_goodsimg_name rename\">"); if (model.showName) { stringBuilder.AppendFormat("<a href=\"{0}\"> {1} </a>", hiShop_Model_Good2.link, hiShop_Model_Good2.title); } stringBuilder.Append("<span>"); if (model.showIco) { stringBuilder.Append("<i class=\"btnAddToCart\" productid=\"" + hiShop_Model_Good2.item_id + "\"></i>"); } if (model.showPrice) { stringBuilder.Append(text + hiShop_Model_Good2.price); if (hiShop_Model_Good2.original_price.ToDecimal(0) > decimal.Zero) { stringBuilder.AppendFormat("<span class=\"original_price\"><s>¥ {0}</s></span>", hiShop_Model_Good2.original_price); } } stringBuilder.Append("</span></section>"); } stringBuilder.Append("</li>"); } } stringBuilder.Append("</ul></section></div>"); } else if (model.layout == 3) { stringBuilder.Append("<div class=\"members_con\">"); stringBuilder.Append("<section class=\"members_goodspic\"><ul>"); if (model.goodslist.Count > 0) { for (int k = 0; k < model.goodslist.Count; k++) { if (k % 3 == 0) { HiShop_Model_Good hiShop_Model_Good3 = model.goodslist[k]; stringBuilder.AppendFormat("<li class=\"biggoods\"><a class=\"goodsimg\" href=\"{0}\"><img data-url=\"{1}\" width=\"100%\"></a>", hiShop_Model_Good3.link, hiShop_Model_Good3.pic); if (model.showName || model.showPrice) { stringBuilder.AppendFormat("<section class=\"members_goodsimg_name rename\">"); if (model.showName) { stringBuilder.AppendFormat("<a href=\"{0}\"> {1} </a>", hiShop_Model_Good3.link, hiShop_Model_Good3.title); } stringBuilder.Append("<span>"); if (model.showIco) { stringBuilder.Append("<i class=\"btnAddToCart\" productid=\"" + hiShop_Model_Good3.item_id + "\"></i>"); } if (model.showPrice) { stringBuilder.Append(text + hiShop_Model_Good3.price); if (hiShop_Model_Good3.original_price.ToDecimal(0) > decimal.Zero) { stringBuilder.AppendFormat("<span class=\"original_price\"><s>¥{0}</s></span>", hiShop_Model_Good3.original_price); } } stringBuilder.Append("</span></section>"); } stringBuilder.Append("</li>"); } else if (k % 3 == 1) { HiShop_Model_Good hiShop_Model_Good4 = model.goodslist[k]; stringBuilder.AppendFormat("<li class=\"mingoods goods_odd two_odd\"><div class=\"b_mingoods_wrapper\"><a href=\"{0}\"><img data-url=\"{1}\" width=\"100%\"></a>", hiShop_Model_Good4.link, hiShop_Model_Good4.pic); stringBuilder.AppendFormat("<section class=\"members_goodsimg_name rename\">"); if (model.showName) { stringBuilder.AppendFormat("<a href=\"{0}\"> {1} </a>", hiShop_Model_Good4.link, hiShop_Model_Good4.title); } if (model.showIco || model.showPrice) { stringBuilder.Append("<span class=\"replace\">"); if (model.showIco) { stringBuilder.Append("<i class=\"btnAddToCart\" productid=\"" + hiShop_Model_Good4.item_id + "\"></i>"); } if (model.showPrice) { stringBuilder.Append(text + hiShop_Model_Good4.price); if (hiShop_Model_Good4.original_price.ToDecimal(0) > decimal.Zero) { stringBuilder.AppendFormat("<span class=\"original_price\"><s>¥ {0}</s></span>", hiShop_Model_Good4.original_price); } } stringBuilder.Append("</span>"); } stringBuilder.Append("</section>"); stringBuilder.Append("</div></li>"); } else if (k % 3 == 2) { HiShop_Model_Good hiShop_Model_Good5 = model.goodslist[k]; stringBuilder.AppendFormat("<li class=\"mingoods goods_even two_even\"><div class=\"b_mingoods_wrapper\"><a href=\"{0}\"><img data-url=\"{1}\" width=\"100%\"></a>", hiShop_Model_Good5.link, hiShop_Model_Good5.pic); stringBuilder.AppendFormat("<section class=\"members_goodsimg_name rename\">"); if (model.showName) { stringBuilder.AppendFormat("<a href=\"{0}\"> {1} </a>", hiShop_Model_Good5.link, hiShop_Model_Good5.title); } if (model.showIco || model.showPrice) { stringBuilder.Append("<span class=\"replace\">"); if (model.showIco) { stringBuilder.Append("<i class=\"btnAddToCart\" productid=\"" + hiShop_Model_Good5.item_id + "\"></i>"); } if (model.showPrice) { stringBuilder.Append(text + hiShop_Model_Good5.price); if (hiShop_Model_Good5.original_price.ToDecimal(0) > decimal.Zero) { stringBuilder.AppendFormat("<span class=\"original_price\"><s>¥ {0}</s></span>", hiShop_Model_Good5.original_price); } } stringBuilder.Append("</span>"); } stringBuilder.Append("</section>"); stringBuilder.Append("</div></li>"); } } } stringBuilder.Append("</ul></section></div>"); } else if (model.layout == 4) { stringBuilder.Append("<div class=\"members_con\">"); stringBuilder.Append("<section class=\"members_goodslist\"><ul>"); if (model.goodslist.Count > 0) { for (int l = 0; l < model.goodslist.Count; l++) { string text2 = ""; if (model.showIco) { string text3 = "AddToCart(this);"; if (model.goodslist[l].productType == 1) { text3 = "serviceProductHref(this);"; } text2 = "<i class=\"btnAddToCart-1\" onclick=\"" + text3 + "\" productid=\"" + model.goodslist[l].item_id + "\"></i>"; } HiShop_Model_Good hiShop_Model_Good6 = model.goodslist[l]; stringBuilder.Append("<li class=\"g-box por rebox\">"); stringBuilder.AppendFormat("<section><a href=\"{0}\"><img data-url=\"{1}\" width=\"88\" height=\"88\"></a></section>", hiShop_Model_Good6.link, hiShop_Model_Good6.pic); stringBuilder.Append("<section class=\"g-flex\">"); stringBuilder.AppendFormat("<a href=\"{0}\"> {1}</a><p>{4} {2} {3} </p>", hiShop_Model_Good6.link, hiShop_Model_Good6.title, text, hiShop_Model_Good6.price, text2); stringBuilder.Append("</section>"); if (!model.showIco) { stringBuilder.AppendFormat("<i class=\"icon_buy\"><a href=\"{0}\" title=\"\">购买</a></i></li>", hiShop_Model_Good6.link); } } } stringBuilder.Append("</ul></section></div>"); } else if (model.layout == 5) { stringBuilder.Append("<div class=\"members_con\">"); stringBuilder.Append("<section class=\"members_goodspic\"><ul>"); if (model.goodslist.Count > 0) { for (int m = 0; m < model.goodslist.Count; m++) { string text4 = model.showIco ? ("<i class=\"btnAddToCart\" productid=\"" + model.goodslist[m].item_id + "\"></i>") : ""; if (m % 2 == 0) { HiShop_Model_Good hiShop_Model_Good7 = model.goodslist[m]; stringBuilder.AppendFormat("<li class=\"b_mingoods goods_even\"><div class=\"b_mingoods_wrapper\">"); stringBuilder.AppendFormat("<a href=\"{0}\"><img data-url=\"{1}\" width=\"100%\"></a>", hiShop_Model_Good7.link, hiShop_Model_Good7.pic); if (model.showIco || model.showPrice) { if (hiShop_Model_Good7.original_price.ToDecimal(0) > decimal.Zero) { stringBuilder.AppendFormat("<p class=\"title\">{0}</p><p class=\"pic_box\">{3}<span class=\"pirce\">¥ {1}</span><span class=\"yj\">¥{2}</span></p>", hiShop_Model_Good7.title, hiShop_Model_Good7.price, hiShop_Model_Good7.original_price, text4); } else { stringBuilder.AppendFormat("<p class=\"title\">{0}</p><p class=\"pic_box\">{2}<span class=\"pirce\">¥ {1}</span></p>", hiShop_Model_Good7.title, hiShop_Model_Good7.price, text4); } } if (!model.showIco) { stringBuilder.AppendFormat("<p class=\"b_mingoods_btn\"><a href=\"{0}\" title=\"立即购买\">立即<br>购买</a></p></div></li>", hiShop_Model_Good7.link); } } else { HiShop_Model_Good hiShop_Model_Good8 = model.goodslist[m]; stringBuilder.AppendFormat("<li class=\"b_mingoods goods_odd\"><div class=\"b_mingoods_wrapper\"><a href=\"{0}\"><img data-url=\"{1}\" width=\"100%\"></a>", hiShop_Model_Good8.link, hiShop_Model_Good8.pic); if (model.showIco || model.showPrice) { if (hiShop_Model_Good8.original_price.ToDecimal(0) > decimal.Zero) { stringBuilder.AppendFormat("<p class=\"title\">{0}</p><p class=\"pic_box\">{3}<span class=\"pirce\">¥ {1}</span><span class=\"yj\">¥{2}</span></p>", hiShop_Model_Good8.title, hiShop_Model_Good8.price, hiShop_Model_Good8.original_price, text4); } else { stringBuilder.AppendFormat("<p class=\"title\">{0}</p><p class=\"pic_box\">{2}<span class=\"pirce\">¥ {1}</span></p>", hiShop_Model_Good8.title, hiShop_Model_Good8.price, text4); } } if (!model.showIco) { stringBuilder.AppendFormat(" <p class=\"b_mingoods_btn\"><a href=\"{0}\" title=\"立即购买\">立即<br>购买</a></p></div></li>", hiShop_Model_Good8.link); } } } } stringBuilder.AppendFormat("</ul></section></div>"); } return(stringBuilder.ToString()); }