Commit be759252 authored by 黄奎's avatar 黄奎

接口调整

parent 0793c1bb
......@@ -182,7 +182,7 @@ namespace Edu.Module.Course
name = EnumHelper.ToName(model.CourseRate) + "~" + EnumHelper.ToName((CourseRateEnum)model.MaxLength);
}
}
return name;
return name.Replace("课程","");
}
/// <summary>
......
......@@ -99,7 +99,17 @@ namespace Edu.WebApi.Controllers.Course
}
else
{
jobj.Add("TotalTimes", item.TotalTimes/2);
jobj.Add("TotalHours", item.TotalTimes);
int TotalTimes = 0;
if (item.TotalTimes % 2 == 1)
{
TotalTimes = item.TotalTimes / 2 + 1;
}
else
{
TotalTimes = item.TotalTimes / 2;
}
jobj.Add("TotalTimes", TotalTimes);
list.Add(jobj);
}
}
......
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