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.
 
 
 
 
 
 

47 lines
1.4 KiB

  1. using Learun.Util;
  2. using System.Web.Mvc;
  3. namespace Learun.Application.Web.Areas.LR_WebChatModule.Controllers
  4. {
  5. /// <summary>
  6. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  7. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  8. /// 创建人:陈彬彬
  9. /// 日 期:2017.04.01
  10. /// 描 述:企业号设置
  11. /// </summary>
  12. public class TokenController : MvcControllerBase
  13. {
  14. #region 视图功能
  15. /// <summary>
  16. /// 企业号管理
  17. /// </summary>
  18. /// <returns></returns>
  19. [HttpGet]
  20. public ActionResult Index()
  21. {
  22. ViewBag.CorpId = Config.GetValue("CorpId");
  23. ViewBag.CorpSecret = Config.GetValue("CorpSecret");
  24. return View();
  25. }
  26. #endregion
  27. #region 提交数据
  28. /// <summary>
  29. /// 保存
  30. /// </summary>
  31. /// <param name="CorpId">企业号CorpID</param>
  32. /// <param name="CorpSecret">管理组凭证密钥</param>
  33. /// <returns></returns>
  34. [HttpPost]
  35. [ValidateAntiForgeryToken]
  36. [AjaxOnly]
  37. public ActionResult SaveForm(string CorpId, string CorpSecret)
  38. {
  39. Config.SetValue("CorpId", CorpId);
  40. Config.SetValue("CorpSecret", CorpSecret);
  41. return Success("操作成功。");
  42. }
  43. #endregion
  44. }
  45. }