完成导航动态加载

This commit is contained in:
yubaolee
2015-11-22 21:32:38 +08:00
parent cd31e8791d
commit 2793d20ef4
8 changed files with 177 additions and 98 deletions

View File

@@ -1,12 +1,25 @@
using System.Web.Mvc;
using Infrastructure;
using OpenAuth.App;
namespace OpenAuth.Mvc.Controllers
{
public class HomeController : BaseController
{
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));
}
public ActionResult Index()
{
return View();
return View(_app.LoadByParent(0));
}
public ActionResult Main()