HomeController.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using Microsoft.AspNetCore.Mvc;
  2. using Abp.AspNetCore.Mvc.Authorization;
  3. using VberAdmin.Authorization.Accounts;
  4. using VberAdmin.Controllers;
  5. using VberAdmin.Query;
  6. namespace VberAdmin.Web.Controllers;
  7. [AbpMvcAuthorize]
  8. public class HomeController : VberAdminControllerBase
  9. {
  10. public HomeController(QueryAppService queryApp, IAccountAppService accountApp)
  11. {
  12. _queryApp = queryApp;
  13. _accountApp = accountApp;
  14. }
  15. private readonly QueryAppService _queryApp;
  16. private readonly IAccountAppService _accountApp;
  17. public ActionResult Index()
  18. {
  19. return View();
  20. }
  21. [AbpMvcAuthorize]
  22. public async Task<ActionResult> UserProfile()
  23. {
  24. var profile = await _accountApp.GetUserProfile(AbpSession.UserId);
  25. return View(profile);
  26. }
  27. [AbpMvcAuthorize]
  28. public async Task<ActionResult> ChangePassword()
  29. {
  30. var profile = await _accountApp.GetUserProfile(AbpSession.UserId);
  31. return View(profile);
  32. }
  33. public async Task<ActionResult> Calendar()
  34. {
  35. ViewBag.NotifyType = await _queryApp.GetCalendarNotifyTypeSelectStr();
  36. return View();
  37. }
  38. }