Commit adf45be8 authored by 黄奎's avatar 黄奎

商品修改

parent bfc7d6f2
...@@ -883,45 +883,22 @@ namespace Mall.Model.Extend.MarketingCenter ...@@ -883,45 +883,22 @@ namespace Mall.Model.Extend.MarketingCenter
/// <summary> /// <summary>
/// 商品编号 /// 商品编号
/// </summary> /// </summary>
public int Id { get; set; } public int id { get; set; }
/// <summary> /// <summary>
/// 商品名称 /// 商品名称
/// </summary> /// </summary>
public string Name { get; set; } public string name { get; set; }
/// <summary> /// <summary>
/// 商品图片 /// 商品图片
/// </summary> /// </summary>
public string CoverImage { get; set; } public string picUrl { get; set; }
/// <summary> /// <summary>
/// 售价 /// 售价
/// </summary> /// </summary>
public decimal SellingPrice { get; set; } public decimal price { get; set; }
public int SalesNum { get; set; }
/// <summary>
/// 商品分类列表
/// </summary>
public List<CategoryItem> CategoryList { get; set; }
}
/// <summary>
/// 商品分类
/// </summary>
public class CategoryItem
{
/// <summary>
/// 商品分类编号
/// </summary>
public int Id { get; set; }
/// <summary>
/// 商品分类名称
/// </summary>
public string CategoryName { get; set; }
} }
/// <summary> /// <summary>
...@@ -935,12 +912,12 @@ namespace Mall.Model.Extend.MarketingCenter ...@@ -935,12 +912,12 @@ namespace Mall.Model.Extend.MarketingCenter
public int id { get; set; } public int id { get; set; }
/// <summary> /// <summary>
/// 分类名称 /// 商品分类
/// </summary> /// </summary>
public string name { get; set; } public string name { get; set; }
/// <summary> /// <summary>
/// 分类名称 /// 菜单名称
/// </summary> /// </summary>
public string menuName { get; set; } public string menuName { get; set; }
...@@ -950,36 +927,16 @@ namespace Mall.Model.Extend.MarketingCenter ...@@ -950,36 +927,16 @@ namespace Mall.Model.Extend.MarketingCenter
public int goodsNum { get; set; } public int goodsNum { get; set; }
/// <summary> /// <summary>
/// 商品列表 /// 是否显示自定义商品
/// </summary>
public List<GoodsDetailsItem> goodsList { get; set; }
}
/// <summary>
/// 商品详情项
/// </summary>
public class GoodsDetailsItem
{
/// <summary>
/// 商品编号
/// </summary>
public int id { get; set; }
/// <summary>
/// 商品名称
/// </summary> /// </summary>
public string Name { get; set; } public bool staticGoods { get; set; }
/// <summary> /// <summary>
/// 商品图片 /// 商品列表
/// </summary>
public string picUrl { get; set; }
/// <summary>
/// 售价
/// </summary> /// </summary>
public decimal SellingPrice { get; set; } public List<GoodsDetailsItem2> goodsList { get; set; }
} }
/// <summary> /// <summary>
/// 门店插件 /// 门店插件
......
...@@ -400,6 +400,29 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -400,6 +400,29 @@ namespace Mall.WebApi.Controllers.MallBase
//商品插件 //商品插件
case "goods": case "goods":
var goodsData = subItem.data as goodsItem; var goodsData = subItem.data as goodsItem;
if (goodsData != null)
{
if (goodsData.list != null && goodsData.list.Count > 0)
{
foreach (var childItem in goodsData.list)
{
childItem.picUrl = Common.Config.GetFileUrl(childItem.picUrl);
}
}
if (goodsData.catList != null && goodsData.catList.Count > 0)
{
foreach (var childItem in goodsData.catList)
{
if (childItem.goodsList != null && childItem.goodsList.Count > 0)
{
foreach (var lastItem in childItem.goodsList)
{
lastItem.picUrl = Common.Config.GetFileUrl(lastItem.picUrl);
}
}
}
}
}
obj = new obj = new
{ {
id = subItem.Id, id = subItem.Id,
......
...@@ -47,7 +47,8 @@ namespace Mall.WebApi ...@@ -47,7 +47,8 @@ namespace Mall.WebApi
"http://localhost:8081", "http://localhost:8081",
"http://localhost:8080", "http://localhost:8080",
"http://localhost:8082", "http://localhost:8082",
"http://127.0.0.1:50512" "http://127.0.0.1:50512",
"http://127.0.0.1:20224"
}; };
services.AddCors(options => options.AddPolicy("AllowCors", policy => policy.AllowAnyHeader().AllowAnyMethod().AllowCredentials().WithOrigins(corsArray.ToArray()))); services.AddCors(options => options.AddPolicy("AllowCors", policy => policy.AllowAnyHeader().AllowAnyMethod().AllowCredentials().WithOrigins(corsArray.ToArray())));
} }
......
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