You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

61 line
1.5 KiB

  1. using Nancy;
  2. using Learun.Util;
  3. using System.Collections.Generic;
  4. using Learun.Application.TwoDevelopment.EducationalAdministration;
  5. using static Learun.Application.WebApi.Modules.StuInfoFreshApi;
  6. using System;
  7. using System.IO;
  8. using Learun.Application.Base.SystemModule;
  9. namespace Learun.Application.WebApi
  10. {
  11. /// <summary>
  12. /// 版 本 Learun-ADMS-Ultimate V7.0.0 力软敏捷开发框架
  13. /// Copyright (c) 2013-2018 上海力软信息技术有限公司
  14. /// 创 建:超级管理员
  15. /// 日 期:2019-08-19 17:50
  16. /// 描 述:教师注册
  17. /// </summary>
  18. public class PushMessageApi : BaseNoLoginApi
  19. {
  20. /// <summary>
  21. /// 推送消息接口
  22. /// <summary>
  23. public PushMessageApi()
  24. : base("/Learun/adms/pushMessage")
  25. {
  26. Get["/msg"] = PushMessage;
  27. }
  28. private Response PushMessage(dynamic _)
  29. {
  30. string msg = this.Request.Query["msg"].ToString();
  31. if (!string.IsNullOrEmpty(msg))
  32. {
  33. SendHubs.callMethod("pushMessage", msg);
  34. }
  35. return Success("成功");
  36. }
  37. #region 获取数据
  38. #endregion
  39. #region 私有类
  40. /// <summary>
  41. /// 表单实体类
  42. /// <summary>
  43. private class ReqFormEntity
  44. {
  45. public string keyValue { get; set; }
  46. public string strEntity { get; set; }
  47. }
  48. #endregion
  49. }
  50. }