From 2f52d6f6521787cb2f21ee136dd8a28181d30b6b Mon Sep 17 00:00:00 2001 From: yubaolee Date: Tue, 1 Dec 2015 17:59:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E7=95=8C=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?=E6=99=9A=E4=B8=8A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenAuth.Mvc/Controllers/HomeController.cs | 5 ++++- OpenAuth.Mvc/Views/Home/Index.cshtml | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/OpenAuth.Mvc/Controllers/HomeController.cs b/OpenAuth.Mvc/Controllers/HomeController.cs index 48edeb93..ed45d07e 100644 --- a/OpenAuth.Mvc/Controllers/HomeController.cs +++ b/OpenAuth.Mvc/Controllers/HomeController.cs @@ -1,6 +1,8 @@ using System.Web.Mvc; using Infrastructure; +using Infrastructure.Helper; using OpenAuth.App; +using OpenAuth.App.ViewModel; namespace OpenAuth.Mvc.Controllers { @@ -19,7 +21,8 @@ namespace OpenAuth.Mvc.Controllers } public ActionResult Index() { - return View(_app.LoadByParent(0)); + var user = SessionHelper.GetSessionUser(); + return View(user.Modules); } public ActionResult Main() diff --git a/OpenAuth.Mvc/Views/Home/Index.cshtml b/OpenAuth.Mvc/Views/Home/Index.cshtml index 50fe46e5..5bade585 100644 --- a/OpenAuth.Mvc/Views/Home/Index.cshtml +++ b/OpenAuth.Mvc/Views/Home/Index.cshtml @@ -1,4 +1,4 @@ -@model List +@model List @@ -204,12 +204,12 @@ {
  • @module.Name
  • - foreach (var child in module.Childern) + @*foreach (var child in module.Childern) {
  • @child.Name
  • - } + }*@ }