|
|
@@ -6,15 +6,18 @@ using System.Web; |
|
|
|
using Learun.Application.Base.SystemModule; |
|
|
|
using Learun.Application.Organization; |
|
|
|
using Learun.Application.TwoDevelopment.EducationalAdministration; |
|
|
|
using Learun.Util; |
|
|
|
using Nancy; |
|
|
|
using static Learun.Application.WebApi.Until.MyEnum; |
|
|
|
|
|
|
|
namespace Learun.Application.WebApi.Modules |
|
|
|
{ |
|
|
|
public class Arrangelesson : BaseApi |
|
|
|
public class Arrangelesson : BaseNoAuthenticationNoLogin |
|
|
|
{ |
|
|
|
public Arrangelesson() |
|
|
|
: base("/arrangelesson/") |
|
|
|
{ |
|
|
|
Get["/gettoken"] = GetToken; |
|
|
|
Get["/lessontype"] = GetLessonTypes; |
|
|
|
Get["/classtype"] = GetClassType; |
|
|
|
Get["/student"] = GetStudents; |
|
|
@@ -82,7 +85,14 @@ namespace Learun.Application.WebApi.Modules |
|
|
|
{ |
|
|
|
return Success("ok"); |
|
|
|
} |
|
|
|
|
|
|
|
private Response GetToken(dynamic _) |
|
|
|
{ |
|
|
|
string sid = Request.Query["sysid"]; |
|
|
|
var sys = EnumAttribute.GetVal(typeof(ThrSys), sid.ToInt()); |
|
|
|
if (sys.IsEmpty()) return Fail("参数错误!"); |
|
|
|
var token = DESEncrypt.Encrypt(sys); |
|
|
|
return Success(token); |
|
|
|
} |
|
|
|
private Response GetAllLesson(dynamic _) |
|
|
|
{ |
|
|
|
var result = lessonInfoIbll.GetAllLesson(); |
|
|
|