Commit 00aee436 authored by 黄奎's avatar 黄奎

页面修改

parent 5ba531c3
......@@ -263,6 +263,36 @@ namespace Mall.Common
return timeStr;
}
/// <summary>
/// 格式化时间【yyyy-MM-dd】
/// </summary>
/// <param name="time"></param>
/// <returns></returns>
public static string FormatDate2(this object time)
{
string timeStr = "";
if (time != null)
{
try
{
timeStr = Convert.ToDateTime(time.ToString()).ToString("yyyy-MM-dd");
if (timeStr == "0001-01-01")
{
timeStr = "";
}
else
{
timeStr= Convert.ToDateTime(time.ToString()).ToString("yyyy-MM-dd HH:mm");
}
}
catch
{
}
}
return timeStr;
}
/// <summary>
/// 字符串转List
/// </summary>
......
......@@ -1708,7 +1708,8 @@ namespace Mall.WebApi.Controllers.Education
/// </summary>
/// <returns></returns>
[HttpPost]
[AllowAnonymous] [RateValve(Policy = Policy.Ip, Limit = 10, Duration = 60)]
[AllowAnonymous]
[RateValve(Policy = Policy.Ip, Limit = 10, Duration = 60)]
public ApiResult GetActivityTypeList(object requestMsg)
{
var parms = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
......@@ -2564,7 +2565,7 @@ namespace Mall.WebApi.Controllers.Education
/// </summary>
/// <returns></returns>
[HttpPost]
[AllowAnonymous] [RateValve(Policy = Policy.Ip, Limit = 10, Duration = 60)]
[AllowAnonymous] [RateValve(Policy = Policy.Ip, Limit = 10, Duration = 60)]
public ApiResult GetUserActivityListJXH()
{
// var parms = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
......@@ -2626,7 +2627,7 @@ namespace Mall.WebApi.Controllers.Education
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[AllowAnonymous] [RateValve(Policy = Policy.Ip, Limit = 10, Duration = 60)]
[AllowAnonymous] [RateValve(Policy = Policy.Ip, Limit = 10, Duration = 60)]
public ApiResult GetActivityDetialJXH()
{
var req = RequestParm;
......
......@@ -1461,7 +1461,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
x.Address,
x.LatAndLon,
x.Developers,
OpenTime = x.OpenTime.HasValue ? x.OpenTime.Value.ToString("yyyy-MM-dd HH:mm") : "",
OpenTime = Common.ConvertHelper.FormatDate2(x.OpenTime),
x.ProjectType,
ProjectTypeName = x.ProjectType.GetEnumName(),
x.CarrierSize,
......@@ -1476,7 +1476,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
x.UserName,
x.UserIcon,
x.CarrierMetroList
});
});
return ApiResult.Success(data: pageModel);
}
......@@ -1622,10 +1622,10 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
return ApiResult.Failed("请上传介绍图");
}
if (!query.OpenTime.HasValue)
{
return ApiResult.Failed("请输入开业时间");
}
//if (!query.OpenTime.HasValue)
//{
// return ApiResult.Failed("请输入开业时间");
//}
if (!query.ProjectType.HasValue)
{
return ApiResult.Failed("请选择项目类型");
......
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