OpenAuth.Net/OpenAuth.Mvc/Controllers/HomeController.cs

33 lines
851 B
C#
Raw Normal View History

2015-11-13 21:33:53 +08:00
using System.Web.Mvc;
2015-11-22 21:32:38 +08:00
using Infrastructure;
2015-12-01 17:59:08 +08:00
using Infrastructure.Helper;
2015-11-22 21:32:38 +08:00
using OpenAuth.App;
2015-12-01 17:59:08 +08:00
using OpenAuth.App.ViewModel;
2015-09-22 23:10:00 +08:00
namespace OpenAuth.Mvc.Controllers
{
public class HomeController : BaseController
{
2015-11-22 21:32:38 +08:00
private ModuleManagerApp _app;
public HomeController()
{
_app = (ModuleManagerApp)DependencyResolver.Current.GetService(typeof(ModuleManagerApp));
}
public string GetModules(int parentId = 0)
{
return JsonHelper.Instance.Serialize(_app.LoadByParent(parentId));
}
2015-09-22 23:10:00 +08:00
public ActionResult Index()
{
2015-12-01 17:59:08 +08:00
var user = SessionHelper.GetSessionUser<LoginUserVM>();
return View(user.Modules);
2015-09-22 23:10:00 +08:00
}
2015-10-26 21:58:12 +08:00
public ActionResult Main()
{
2015-10-26 21:58:12 +08:00
return View();
}
2015-09-22 23:10:00 +08:00
}
}