Commit a6403564 authored by 黄奎's avatar 黄奎

页面修改

parent 0591a856
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
using Mall.Model.Entity.MarketingCenter; using Mall.Model.Entity.MarketingCenter;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text; using System.Text;
namespace Mall.Model.Extend.MarketingCenter namespace Mall.Model.Extend.MarketingCenter
...@@ -904,6 +905,11 @@ namespace Mall.Model.Extend.MarketingCenter ...@@ -904,6 +905,11 @@ namespace Mall.Model.Extend.MarketingCenter
/// 售价 /// 售价
/// </summary> /// </summary>
public decimal price { get; set; } public decimal price { get; set; }
/// <summary>
/// 【原价】前端使用
/// </summary>
public decimal OriginalPrice { get; set; }
} }
/// <summary> /// <summary>
...@@ -1919,6 +1925,11 @@ namespace Mall.Model.Extend.MarketingCenter ...@@ -1919,6 +1925,11 @@ namespace Mall.Model.Extend.MarketingCenter
public string key { get; set; } public string key { get; set; }
/// <summary>
/// 网站链接
/// </summary>
public string url { get; set; }
//public string @params { get; set; } //public string @params { get; set; }
} }
......
...@@ -87,8 +87,8 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -87,8 +87,8 @@ namespace Mall.WebApi.Controllers.MallBase
MiniAppId = RequestParm.MiniAppId; MiniAppId = RequestParm.MiniAppId;
} }
catch (Exception ex) catch (Exception ex)
{ {
Common.Plugin.LogHelper.Error("MallController_GetHome", ex);
} }
var homePage = new object(); var homePage = new object();
//底部导航 //底部导航
...@@ -100,7 +100,8 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -100,7 +100,8 @@ namespace Mall.WebApi.Controllers.MallBase
if (miniProgram != null && miniProgram.MallBaseId > 0) if (miniProgram != null && miniProgram.MallBaseId > 0)
{ {
//底部导航 //底部导航
navbar = new { navbar = new
{
//底部导航背景颜色 //底部导航背景颜色
bottom_background_color = miniProgram.BottomNavBgColor, bottom_background_color = miniProgram.BottomNavBgColor,
//顶部导航背景颜色 //顶部导航背景颜色
...@@ -110,15 +111,16 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -110,15 +111,16 @@ namespace Mall.WebApi.Controllers.MallBase
//导航底部是否开启阴影效果(0-未开启,1-开启) //导航底部是否开启阴影效果(0-未开启,1-开启)
shadow = miniProgram.BottomNavIsShadow, shadow = miniProgram.BottomNavIsShadow,
//导航栏 //导航栏
navs = miniProgram.BottomTagList.Select(qitem => new { navs = miniProgram.BottomTagList.Select(qitem => new
active_color=qitem.CheckedColor, {
active_icon=qitem.CheckedIcon, active_color = qitem.CheckedColor,
color=qitem.DefaultColor, active_icon = qitem.CheckedIcon,
text=qitem.TagName, color = qitem.DefaultColor,
icon=qitem.DefaultIcon, text = qitem.TagName,
url=qitem.TagLink, icon = qitem.DefaultIcon,
open_type="redirect", url = qitem.TagLink,
key=qitem.TagLink== "/pages/live/index" ? "live":"", open_type = "redirect",
key = qitem.TagLink == "/pages/live/index" ? "live" : "",
}), }),
}; };
...@@ -434,9 +436,10 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -434,9 +436,10 @@ namespace Mall.WebApi.Controllers.MallBase
cats.goodsList.Add(new GoodsDetailsItem2() cats.goodsList.Add(new GoodsDetailsItem2()
{ {
id = gItem.Id, id = gItem.Id,
price = gItem?.SellingPrice ?? 0, price = Math.Round(gItem?.SellingPrice ?? 0, 2) ,
name = gItem.Name, name = gItem.Name,
picUrl = Common.Config.GetFileUrl(gItem.CoverImage) picUrl = Common.Config.GetFileUrl(gItem.CoverImage),
OriginalPrice= Math.Round(gItem?.OriginalPrice ?? 0, 2)
}); });
} }
} }
...@@ -456,9 +459,10 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -456,9 +459,10 @@ namespace Mall.WebApi.Controllers.MallBase
cats.goodsList.Add(new GoodsDetailsItem2() cats.goodsList.Add(new GoodsDetailsItem2()
{ {
id = gItem.Id, id = gItem.Id,
price = gItem?.SellingPrice ?? 0, price = Math.Round(gItem?.SellingPrice ?? 0, 2),
name = gItem.Name, name = gItem.Name,
picUrl = Common.Config.GetFileUrl(gItem.CoverImage) picUrl = Common.Config.GetFileUrl(gItem.CoverImage),
OriginalPrice = Math.Round(gItem?.OriginalPrice ?? 0, 2)
}); });
} }
} }
...@@ -1290,8 +1294,9 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1290,8 +1294,9 @@ namespace Mall.WebApi.Controllers.MallBase
if (tempGood != null && tempGood.Id > 0) if (tempGood != null && tempGood.Id > 0)
{ {
lastItem.name = tempGood?.Name ?? lastItem.name; lastItem.name = tempGood?.Name ?? lastItem.name;
lastItem.price = tempGood?.SellingPrice ?? lastItem.price; lastItem.price = Math.Round((tempGood?.SellingPrice ?? lastItem.price), 2);
lastItem.picUrl = tempGood?.CoverImage != null ? Common.Config.GetFileUrl(tempGood.CoverImage) : Common.Config.GetFileUrl(lastItem.picUrl); lastItem.picUrl = tempGood?.CoverImage != null ? Common.Config.GetFileUrl(tempGood.CoverImage) : Common.Config.GetFileUrl(lastItem.picUrl);
lastItem.OriginalPrice = Math.Round((tempGood?.OriginalPrice ?? 0), 2);
} }
} }
} }
...@@ -1313,9 +1318,10 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1313,9 +1318,10 @@ namespace Mall.WebApi.Controllers.MallBase
childItem.goodsList.Add(new GoodsDetailsItem2() childItem.goodsList.Add(new GoodsDetailsItem2()
{ {
id = gItem.Id, id = gItem.Id,
price = gItem?.SellingPrice ?? 0, price = Math.Round((gItem?.SellingPrice ?? 0), 2),
name = gItem.Name, name = gItem.Name,
picUrl = Common.Config.GetFileUrl(gItem.CoverImage) picUrl = Common.Config.GetFileUrl(gItem.CoverImage),
OriginalPrice= Math.Round((gItem?.OriginalPrice ?? 0), 2)
}); });
} }
} }
...@@ -1342,9 +1348,10 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1342,9 +1348,10 @@ namespace Mall.WebApi.Controllers.MallBase
goodsData.list.Add(new GoodsDetailsItem2() goodsData.list.Add(new GoodsDetailsItem2()
{ {
id = gItem.Id, id = gItem.Id,
price = gItem?.SellingPrice ?? 0, price = Math.Round((gItem?.SellingPrice ?? 0), 2),
name = gItem.Name, name = gItem.Name,
picUrl = Common.Config.GetFileUrl(gItem.CoverImage) picUrl = Common.Config.GetFileUrl(gItem.CoverImage),
OriginalPrice = Math.Round((gItem?.OriginalPrice ?? 0), 2)
}); });
} }
} }
...@@ -1367,8 +1374,9 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1367,8 +1374,9 @@ namespace Mall.WebApi.Controllers.MallBase
if (tempGood != null && tempGood.Id > 0) if (tempGood != null && tempGood.Id > 0)
{ {
childItem.name = tempGood?.Name ?? childItem.name; childItem.name = tempGood?.Name ?? childItem.name;
childItem.price = tempGood?.SellingPrice ?? childItem.price; childItem.price = Math.Round((tempGood?.SellingPrice ?? childItem.price), 2);
childItem.picUrl = tempGood?.CoverImage != null ? Common.Config.GetFileUrl(tempGood.CoverImage) : Common.Config.GetFileUrl(childItem.picUrl); childItem.picUrl = tempGood?.CoverImage != null ? Common.Config.GetFileUrl(tempGood.CoverImage) : Common.Config.GetFileUrl(childItem.picUrl);
childItem.OriginalPrice= Math.Round((tempGood?.OriginalPrice ?? 0), 2);
} }
} }
} }
...@@ -1597,6 +1605,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1597,6 +1605,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[HttpPost] [HttpPost]
[AllowAnonymous]
public ApiResult GetUserCenter() public ApiResult GetUserCenter()
{ {
JObject parms = JObject.Parse(RequestParm.msg.ToString()); JObject parms = JObject.Parse(RequestParm.msg.ToString());
...@@ -1647,6 +1656,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1647,6 +1656,7 @@ namespace Mall.WebApi.Controllers.MallBase
icon_url = qitem.MenuIcon, icon_url = qitem.MenuIcon,
name = qitem.MenuName, name = qitem.MenuName,
is_show = 1, is_show = 1,
link_url = qitem.MenuUrl,
}), }),
//自定义菜单 //自定义菜单
menus = miniProgram?.SelfMenuList.Select(qitem => new menus = miniProgram?.SelfMenuList.Select(qitem => new
......
...@@ -23,7 +23,7 @@ namespace Mall.WebApi.Filter ...@@ -23,7 +23,7 @@ namespace Mall.WebApi.Filter
{ {
try try
{ {
LogHelper.WriteInfo("拦截异常信息:" + context.Exception); LogHelper.WriteInfo("ApiExceptionFilterAttribute_OnException拦截异常信息:" + context.Exception);
} }
catch catch
{ {
......
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