Commit b7a30b2f authored by 黄奎's avatar 黄奎

新增插件字段

parent bb1d72f9
...@@ -797,6 +797,41 @@ namespace Mall.Model.Extend.MarketingCenter ...@@ -797,6 +797,41 @@ namespace Mall.Model.Extend.MarketingCenter
/// 视频地址 /// 视频地址
/// </summary> /// </summary>
public string url { get; set; } public string url { get; set; }
/// <summary>
/// 上边距
/// </summary>
public string top { get; set; }
/// <summary>
/// 下边距
/// </summary>
public string bottom { get; set; }
/// <summary>
/// 左边距
/// </summary>
public string left { get; set; }
/// <summary>
/// 右边距
/// </summary>
public string right { get; set; }
/// <summary>
/// 是否全屏
/// </summary>
public bool isfullscreen { get; set; }
/// <summary>
/// 背景图
/// </summary>
public string backgroundimage { get; set; }
/// <summary>
/// 圆角
/// </summary>
public string radius { get; set; }
} }
/// <summary> /// <summary>
......
...@@ -329,7 +329,27 @@ namespace Mall.Module.MarketingCenter ...@@ -329,7 +329,27 @@ namespace Mall.Module.MarketingCenter
item.data = subData; item.data = subData;
break; break;
//视频插件 //视频插件
case "video": item.data = JsonHelper.DeserializeObject<videoItem>(item.data.ToString()); break; case "video":
videoItem videoData = new videoItem();
try
{
var video = JsonHelper.DeserializeObject<videoItem>(item.data.ToString());
videoData.pic_url = video?.pic_url ?? "";
videoData.url = video?.url ?? "";
videoData.top = video?.top ?? "0";
videoData.bottom = video?.bottom ?? "0";
videoData.left = video?.left ?? "0";
videoData.right = video?.right ?? "0";
videoData.isfullscreen = video?.isfullscreen ?? false;
videoData.backgroundimage = video?.backgroundimage ?? "";
videoData.radius = video?.radius ?? "0";
}
catch
{
}
item.data = videoData;
break;
//商品插件 //商品插件
case "goods": item.data = JsonHelper.DeserializeObject<goodsItem>(item.data.ToString()); break; case "goods": item.data = JsonHelper.DeserializeObject<goodsItem>(item.data.ToString()); break;
//门店插件 //门店插件
......
...@@ -214,7 +214,27 @@ namespace Mall.Module.User ...@@ -214,7 +214,27 @@ namespace Mall.Module.User
switch (item.Id) switch (item.Id)
{ {
case "rubik": item.data = JsonHelper.DeserializeObject<rubikItem>(item.data.ToString()); break; case "rubik": item.data = JsonHelper.DeserializeObject<rubikItem>(item.data.ToString()); break;
case "video": item.data = JsonHelper.DeserializeObject<videoItem>(item.data.ToString()); break; case "video":
videoItem videoData = new videoItem();
try
{
var video = JsonHelper.DeserializeObject<videoItem>(item.data.ToString());
videoData.pic_url = video?.pic_url ?? "";
videoData.url = video?.url ?? "";
videoData.top = video?.top ?? "0";
videoData.bottom = video?.bottom ?? "0";
videoData.left = video?.left ?? "0";
videoData.right = video?.right ?? "0";
videoData.isfullscreen = video?.isfullscreen ?? false;
videoData.backgroundimage = video?.backgroundimage ?? "";
videoData.radius = video?.radius ?? "0";
}
catch
{
}
item.data = videoData;
break;
case "image-text": item.data = JsonHelper.DeserializeObject<imagetextItem>(item.data.ToString()); break; case "image-text": item.data = JsonHelper.DeserializeObject<imagetextItem>(item.data.ToString()); break;
} }
} }
......
...@@ -1382,6 +1382,13 @@ namespace Mall.WebApi.Controllers ...@@ -1382,6 +1382,13 @@ namespace Mall.WebApi.Controllers
{ {
pic_url = Common.Config.GetFileUrl(subitem.video_pic_url), pic_url = Common.Config.GetFileUrl(subitem.video_pic_url),
url = subitem.video_url, url = subitem.video_url,
bottom = "0",
left = "0",
right = "0",
top = "0",
isfullscreen = false,
backgroundimage = "",
radius="0"
} }
}); });
templateData.data.Add(new templateData.data.Add(new
......
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