From f0723f822efe39a689f79a795668ec134b5422c6 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Fri, 16 Apr 2021 18:24:29 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E5=8A=9E?= =?UTF-8?q?=E4=BA=8B=E5=A4=A7=E5=8E=85=E6=A8=A1=E5=BC=8F=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/SSOSystemController.cs | 41 +++++ .../Views/SSOSystem/DragModelOne.cshtml | 147 ++++++++++-------- 2 files changed, 123 insertions(+), 65 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs index 921d12f58..34840f03f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs @@ -954,6 +954,47 @@ namespace Learun.Application.Web.Controllers } ViewBag.NewsList = outnewslist.Take(5); ViewBag.NewsListStr = JsonConvert.SerializeObject(ViewBag.NewsList); + //宣传报道 + var newsListOfxuanchuan = outnewslist.Where(x => x.F_CategoryId == "15").Take(4); + foreach (var item in newsListOfxuanchuan) + { + if (!string.IsNullOrEmpty(item.F_NewsImage)) + { + var imagePath = annexesFileIBLL.GetEntityByFolderId(item.F_NewsImage)?.F_FilePath; + if (!string.IsNullOrEmpty(imagePath)) + { + item.F_NewsImage = imagePath.Substring(imagePath.IndexOf("Resource")); + } + else + { + item.F_NewsImage = "/Content/images/DragSSO/noLogin.png"; + } + } + } + ViewBag.NewsListOfxuanchuan = newsListOfxuanchuan; + ViewBag.NewsListOfxuanchuanStr = JsonConvert.SerializeObject(ViewBag.NewsListOfxuanchuan); + //智慧教育 + ViewBag.NewsListOfzhihui = outnewslist.Where(x => x.F_CategoryId == "16").Take(6); + ViewBag.NewsListOfzhihuiStr = JsonConvert.SerializeObject(ViewBag.NewsListOfzhihui); + //专题推荐 + var newsListOfzhuanti = outnewslist.Where(x => x.F_CategoryId == "17").Take(7); + foreach (var item in newsListOfzhuanti) + { + if (!string.IsNullOrEmpty(item.F_NewsImage)) + { + var imagePath = annexesFileIBLL.GetEntityByFolderId(item.F_NewsImage)?.F_FilePath; + if (!string.IsNullOrEmpty(imagePath)) + { + item.F_NewsImage = imagePath.Substring(imagePath.IndexOf("Resource")); + } + else + { + item.F_NewsImage = "/Content/images/DragSSO/noLogin.png"; + } + } + } + ViewBag.NewsListOfzhuanti = newsListOfzhuanti; + ViewBag.NewsListOfzhuantiStr = JsonConvert.SerializeObject(ViewBag.NewsListOfzhuanti); //办公事项-待办任务 paginationobj.sidx = "F_CreateDate"; paginationobj.rows = 4; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml index cd34229c4..6244b3910 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml @@ -45,7 +45,7 @@ +'
' +'图书馆借阅(未还) ' + '' - + '