2016-01-05 17:14:10 +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;
|
2016-01-14 17:30:29 +08:00
|
|
|
|
using OpenAuth.Mvc.Models;
|
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()
|
2015-12-16 22:52:23 +08:00
|
|
|
|
{
|
|
|
|
|
_app = AutofacExt.GetFromFac<ModuleManagerApp>();
|
2015-11-22 21:32:38 +08:00
|
|
|
|
}
|
2016-01-14 17:30:29 +08:00
|
|
|
|
|
|
|
|
|
[Anonymous]
|
2015-11-22 21:32:38 +08:00
|
|
|
|
public string GetModules(int parentId = 0)
|
|
|
|
|
{
|
|
|
|
|
return JsonHelper.Instance.Serialize(_app.LoadByParent(parentId));
|
|
|
|
|
}
|
2016-01-14 17:30:29 +08:00
|
|
|
|
|
|
|
|
|
[Anonymous]
|
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
|
|
|
|
}
|
2016-01-14 17:30:29 +08:00
|
|
|
|
|
|
|
|
|
[Anonymous]
|
2015-10-26 21:58:12 +08:00
|
|
|
|
public ActionResult Main()
|
2015-10-23 23:19:11 +08:00
|
|
|
|
{
|
2015-10-26 21:58:12 +08:00
|
|
|
|
return View();
|
2015-10-23 23:19:11 +08:00
|
|
|
|
}
|
2016-01-14 17:30:29 +08:00
|
|
|
|
|
|
|
|
|
[Anonymous]
|
2015-12-01 22:46:29 +08:00
|
|
|
|
public ActionResult Git()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
2015-12-06 00:05:32 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 所有页面按钮控制分部视图
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>ActionResult.</returns>
|
|
|
|
|
[ChildActionOnly]
|
2016-01-14 17:30:29 +08:00
|
|
|
|
[Anonymous]
|
2015-12-06 00:05:32 +08:00
|
|
|
|
public ActionResult MenuHeader()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
2015-09-22 23:10:00 +08:00
|
|
|
|
}
|
2015-09-20 21:59:36 +08:00
|
|
|
|
}
|