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.

Index.cs 1.1 KiB

4 years ago
4 years ago
12345678910111213141516171819202122232425262728293031323334353637383940
  1. using Nancy;
  2. namespace Learun.Application.WebApi
  3. {
  4. /// <summary>
  5. /// 版 本 Learun-ADMS V7.0.0 数字化智慧校园
  6. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  7. /// 创建人:数字化智慧校园-框架开发组
  8. /// 日 期:2017.05.12
  9. /// 描 述:默认页面
  10. /// </summary>
  11. public class Index : BaseApi
  12. {
  13. public Index()
  14. : base()
  15. {
  16. Get["/"] = MainIndex;
  17. Get["/index.html"] = MainIndex;
  18. Get["/bgimg"] = BgImg;
  19. }
  20. /// <summary>
  21. /// 默认开始页面
  22. /// </summary>
  23. /// <param name="_"></param>
  24. /// <returns></returns>
  25. private Response MainIndex(dynamic _)
  26. {
  27. return Response.AsFile("index.html");
  28. }
  29. /// <summary>
  30. /// 默认开始页面图片
  31. /// </summary>
  32. /// <param name="_"></param>
  33. /// <returns></returns>
  34. private Response BgImg(dynamic _)
  35. {
  36. return Response.AsImage("port.png");
  37. }
  38. }
  39. }