Commit d76eb05b authored by 黄奎's avatar 黄奎

页面修改

parent 8f49169d
...@@ -1904,17 +1904,20 @@ namespace Mall.Module.Product ...@@ -1904,17 +1904,20 @@ namespace Mall.Module.Product
{ {
var sModel = speciList.Where(x => x.GoodsId == item.GoodsId).ToList()[i]; var sModel = speciList.Where(x => x.GoodsId == item.GoodsId).ToList()[i];
var svModel = speciVList.Where(x => x.GoodsId == item.GoodsId && x.SpecificationId == sModel.Id && x.Sort == Convert.ToInt32(KeyArr[i])).FirstOrDefault(); var svModel = speciVList.Where(x => x.GoodsId == item.GoodsId && x.SpecificationId == sModel.Id && x.Sort == Convert.ToInt32(KeyArr[i])).FirstOrDefault();
item.SpecificationNameList.Add(sModel.Name + ":" + svModel.Name); if(svModel!= null)
attr_list.Add(new
{ {
attr_group_name = sModel.Name, item.SpecificationNameList.Add(sModel.Name + ":" + svModel.Name);
attr_group_id = sModel.Sort, attr_list.Add(new
attr_id = svModel.Id, {
attr_name = svModel.Name attr_group_name = sModel.Name,
}); attr_group_id = sModel.Sort,
if (i == 0 && !string.IsNullOrEmpty(svModel.Image)) attr_id = svModel.Id,
{ attr_name = svModel.Name
item.CoverImage = svModel.Image;//规格图片赋值 });
if (i == 0 && !string.IsNullOrEmpty(svModel.Image))
{
item.CoverImage = svModel.Image;//规格图片赋值
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment