Commit 96142968 authored by 吴春's avatar 吴春

提交插件

parent 39037f3f
......@@ -2301,7 +2301,7 @@ namespace Mall.Model.Extend.MarketingCenter
/// </summary>
public int listStyle { get; set; }
/// <summary>
/// 背景颜色
......@@ -2422,7 +2422,7 @@ namespace Mall.Model.Extend.MarketingCenter
/// </summary>
public int listStyle { get; set; }
/// <summary>
/// 背景颜色
/// </summary>
......@@ -2466,4 +2466,286 @@ namespace Mall.Model.Extend.MarketingCenter
#endregion
#region 门店
/// <summary>
/// 门店
/// </summary>
public class StoreGoodsItem
{
/// <summary>
/// 显示分类
/// </summary>
public bool showCat { get; set; }
/// <summary>
/// 分类栏位置
/// </summary>
public string catPosition { get; set; }
/// <summary>
/// 分类样式
/// </summary>
public int catStyle { get; set; }
/// <summary>
/// 商品添加方式【0-自动添加,1-手动添加】
/// </summary>
public int addGoodsType { get; set; }
/// <summary>
/// 商品数量
/// </summary>
public int goodsLength { get; set; }
/// <summary>
/// 列表样式[-1-列表模式,0-左右滑动,1-一行一个,2-一行两个3-一行三个 4-教育模式]
/// </summary>
public int listStyle { get; set; }
/// <summary>
/// 商品封面图宽高比例[1-1]
/// </summary>
public string goodsCoverProportion { get; set; }
/// <summary>
/// 商品封面图填充
/// </summary>
public int fill { get; set; }
/// <summary>
/// 商品样式
/// </summary>
public int goodsStyle { get; set; }
/// <summary>
/// 文本样式
/// </summary>
public int textStyle { get; set; }
/// <summary>
/// 显示商品名称
/// </summary>
public bool showGoodsName { get; set; }
/// <summary>
/// 显示商品价格
/// </summary>
public bool showGoodsPrice { get; set; }
/// <summary>
/// 显示购买按钮
/// </summary>
public bool showBuyBtn { get; set; }
/// <summary>
/// 购买按钮样式[cart]
/// </summary>
public string buyBtn { get; set; }
/// <summary>
/// 购买按钮文字样式
/// </summary>
public int buyBtnStyle { get; set; }
/// <summary>
/// 购买按钮文字
/// </summary>
public string buyBtnText { get; set; }
/// <summary>
/// 购买按钮颜色
/// </summary>
public string buttonColor { get; set; }
/// <summary>
/// 显示评分 ld 2020-10-13
/// </summary>
public bool showScore { get; set; }
/// <summary>
/// 评分颜色
/// </summary>
public string scoreColor { get; set; }
/// <summary>
/// 显示商品角标
/// </summary>
public bool showGoodsTag { get; set; }
/// <summary>
/// 商品角标自定义
/// </summary>
public bool customizeGoodsTag { get; set; }
/// <summary>
/// 商品角标链接
/// </summary>
public string goodsTagPicUrl { get; set; }
/// <summary>
/// 是否显示图片背景
/// </summary>
public bool showImg { get; set; }
/// <summary>
/// 背景颜色
/// </summary>
public string backgroundColor { get; set; }
/// <summary>
/// 背景链接
/// </summary>
public string backgroundPicUrl { get; set; }
/// <summary>
///
/// </summary>
public int position { get; set; }
/// <summary>
/// 图片位置
/// </summary>
public int mode { get; set; }
/// <summary>
/// 背景高
/// </summary>
public int backgroundHeight { get; set; }
/// <summary>
/// 背景宽
/// </summary>
public int backgroundWidth { get; set; }
/// <summary>
/// 分类列表
/// </summary>
public List<StoreCatItem> catList { get; set; }
/// <summary>
/// 商品列表
/// </summary>
public List<StoreGoodsDetailsItem2> list { get; set; }
}
/// <summary>
/// 门店商品分类
/// </summary>
public class StoreCatItem
{
/// <summary>
/// 分类编号
/// </summary>
public int id { get; set; }
/// <summary>
/// 商品分类
/// </summary>
public string name { get; set; }
/// <summary>
/// 菜单名称
/// </summary>
public string menuName { get; set; }
/// <summary>
/// 商品数量
/// </summary>
public int goodsNum { get; set; }
/// <summary>
/// 是否显示自定义商品
/// </summary>
public bool staticGoods { get; set; }
/// <summary>
/// 商品列表
/// </summary>
public List<GoodsDetailsItem2> goodsList { get; set; }
}
/// <summary>
/// 门店商品详情项
/// </summary>
public class StoreGoodsDetailsItem2
{
/// <summary>
/// 商品编号
/// </summary>
public int id { get; set; }
/// <summary>
/// 商品名称
/// </summary>
public string name { get; set; }
/// <summary>
/// 商品图片
/// </summary>
public string picUrl { get; set; }
/// <summary>
/// 售价
/// </summary>
public decimal price { get; set; }
/// <summary>
/// 【原价】前端使用
/// </summary>
public decimal OriginalPrice { get; set; }
/// <summary>
/// 课程评分 2020-10-13 ld
/// </summary>
public decimal courseScore { get; set; }
}
/// <summary>
/// 门店
/// </summary>
public class ReserveStoreItem
{
/// <summary>
/// 上边距
/// </summary>
public string PaddingTop { get; set; }
/// <summary>
/// 下边距
/// </summary>
public string PaddingBottom { get; set; }
/// <summary>
/// 左边距
/// </summary>
public string PaddingLeft { get; set; }
/// <summary>
/// 右边距
/// </summary>
public string PaddingRight { get; set; }
/// <summary>
/// 搜索圆角像素
/// </summary>
public int SearchFilletPX
{
get;
set;
}
/// <summary>
/// 是否显示封面图
/// </summary>
public bool IsShowStoreImg { get; set; }
}
#endregion
}
\ No newline at end of file
......@@ -161,11 +161,11 @@ namespace Mall.Module.MarketingCenter
h = h_root,
hotspot = new List<hotspotItem>(),
list = new List<rubikDetailItem>(),
left=jObj.ContainsKey("left")? jObj["left"].ToString():"0",
right = jObj.ContainsKey("right") ? jObj["right"].ToString():"0",
top = jObj.ContainsKey("top") ? jObj["top"].ToString():"0",
bottom = jObj.ContainsKey("bottom") ? jObj["bottom"].ToString():"0",
background= jObj.ContainsKey("background") ? jObj["background"].ToString():"",
left = jObj.ContainsKey("left") ? jObj["left"].ToString() : "0",
right = jObj.ContainsKey("right") ? jObj["right"].ToString() : "0",
top = jObj.ContainsKey("top") ? jObj["top"].ToString() : "0",
bottom = jObj.ContainsKey("bottom") ? jObj["bottom"].ToString() : "0",
background = jObj.ContainsKey("background") ? jObj["background"].ToString() : "",
};
if (!string.IsNullOrWhiteSpace(jObj["hotspot"].ToString()))
......@@ -186,7 +186,7 @@ namespace Mall.Module.MarketingCenter
int zIndex = 0;
if (subItem["zIndex"] != null && !string.IsNullOrWhiteSpace(subItem["zIndex"].ToString()))
{
Int32.TryParse(subItem["zIndex"].ToString(), out zIndex);
Int32.TryParse(subItem["zIndex"].ToString(), out zIndex);
}
var links = new List<rubikLinkItem>();
if (subItem["link"] != null && !string.IsNullOrWhiteSpace(subItem["link"].ToString()))
......@@ -253,7 +253,7 @@ namespace Mall.Module.MarketingCenter
}
catch
{
}
}
try
......@@ -397,12 +397,12 @@ namespace Mall.Module.MarketingCenter
}
}
catch
{
{
}
item.data = shopModel;
break;
//司导插件
//司导插件
case "drive-guide":
driveGuideItem driveModel = new driveGuideItem();
try
......@@ -513,6 +513,29 @@ namespace Mall.Module.MarketingCenter
}
item.data = educationArticleModel;
break;
//商品插件
case "storeGoods": item.data = JsonHelper.DeserializeObject<StoreGoodsItem>(item.data.ToString()); break;
case "reservestore":
ReserveStoreItem storeModel = new ReserveStoreItem();
try
{
var driveData = JsonHelper.DeserializeObject<ReserveStoreItem>(item.data.ToString());
if (driveData != null)
{
storeModel.PaddingTop = driveData?.PaddingTop ?? "0";
storeModel.PaddingBottom = driveData?.PaddingBottom ?? "0";
storeModel.PaddingLeft = driveData?.PaddingLeft ?? "0";
storeModel.PaddingRight = driveData?.PaddingRight ?? "0";
storeModel.SearchFilletPX = driveData?.SearchFilletPX ?? 0;
storeModel.IsShowStoreImg = driveData?.IsShowStoreImg ?? false;
}
}
catch
{
}
item.data = storeModel;
break;
}
}
......
This diff is collapsed.
......@@ -531,6 +531,17 @@ namespace Mall.WebApi.Controllers.MarketingCenter
}
item.data = noticeData;
break;
//商品插件
case "storeGoods":
var storeGoodData = Common.Plugin.JsonHelper.DeserializeObject<StoreGoodsItem>(item.data.ToString());
if (!string.IsNullOrWhiteSpace(storeGoodData.goodsTagPicUrl))
{
Common.Plugin.FileHelper.CreateImage(storeGoodData.goodsTagPicUrl);
storeGoodData.goodsTagPicUrl = Common.Plugin.FileHelper.GetFileUrl(storeGoodData.goodsTagPicUrl);
storeGoodData.goodsTagPicUrl = Common.Config.GetFileUrl(storeGoodData.goodsTagPicUrl);
}
item.data = storeGoodData;
break;
}
}
}
......
......@@ -307,8 +307,6 @@ namespace Mall.WebApi.Controllers.Reserve
#endregion
#region 套餐卡
[HttpPost]
......
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