Commit c0f10775 authored by 黄奎's avatar 黄奎

111

parent 1c707e3b
......@@ -103,6 +103,7 @@ namespace Edu.WebApi.Controllers.Applet
/// 获取课预约时间范围
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetPlanTime()
{
List<object> result = new List<object>();
......@@ -113,10 +114,11 @@ namespace Edu.WebApi.Controllers.Applet
});
var today = DateTime.Now;
Int32.TryParse((model?.Code ?? ""), out int WeekStr);
WeekStr = 2;
WeekStr = 1;
DateTime startTime = DateTime.Now;
int NowWeek = (int)today.DayOfWeek;
DateTime endTime = DateTime.Now;
if ((int)today.DayOfWeek < WeekStr - 1)
if (NowWeek > WeekStr - 1)
{
startTime = today.AddDays(0 - Convert.ToInt16(today.DayOfWeek) + 7 + 1);
endTime = today.AddDays(6 - Convert.ToInt16(today.DayOfWeek) + 7 + 1);
......
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