From b879a75bbc6431083dd1d63c089c5745af94bae5 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Thu, 10 Jun 2021 11:02:05 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E6=98=BE=E7=A4=BA=E6=8E=A7=E5=88=B6=EF=BC=9A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=93=BE=E6=8E=A5=E5=9C=B0=E5=9D=80=E7=9A=84=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/TeachSwitch/Form.cshtml | 14 +++++++++++--- .../Views/TeachSwitch/Index.js | 3 +++ .../Controllers/LoginController.cs | 11 +++++++---- .../Views/Login/Default.cshtml | 4 ++-- .../Views/Login/PageFive.cshtml | 4 ++-- .../Views/Login/PageFour.cshtml | 4 ++-- .../Views/Login/PageOne.cshtml | 4 ++-- .../Views/Login/PageSeven.cshtml | 4 ++-- .../Views/Login/PageSix.cshtml | 4 ++-- .../Views/Login/PageThree.cshtml | 4 ++-- .../Views/Login/PageTwo.cshtml | 4 ++-- .../TeachSwitch/TeachSwitchEntity.cs | 5 +++++ .../TeachSwitch/TeachSwitchService.cs | 13 +++++-------- 13 files changed, 47 insertions(+), 31 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachSwitch/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachSwitch/Form.cshtml index 7dfd0a3d5..6993dec39 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachSwitch/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachSwitch/Form.cshtml @@ -3,9 +3,17 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
-
功能开启
-
+
+
开关名称*
+ +
+
+
功能开启*
+
+
+
+
链接地址*
+
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TeachSwitch/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachSwitch/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachSwitch/Index.js index a317d1f94..2a77aa2a6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachSwitch/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachSwitch/Index.js @@ -80,6 +80,8 @@ var bootstrap = function ($, learun) { return '网上办事大厅开关'; } else if (val == 'wxloginforpc') { return '微信快捷登录PC端'; + } else { + return val; } } @@ -96,6 +98,7 @@ var bootstrap = function ($, learun) { }); } }, + { label: "链接地址", name: "url", width: 200, align: "left" }, ], mainId: 'ID', isPage: true diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs index 72f5425be..ad05e3d1d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs @@ -221,11 +221,14 @@ namespace Learun.Application.Web.Controllers var result = teachSwitchIBLL.FindFirst("js"); ViewBag.TeachSwitch = result; - var result2 = teachSwitchIBLL.FindFirst("fx"); - ViewBag.FeiXinSwitch = result2; + //飞信下载 + var result2 = teachSwitchIBLL.GetFirst("fx"); + ViewBag.FeiXinSwitch = result2.status == "1" ? true : false; + ViewBag.FeiXinUrl = result2.url; //网上办事大厅 - var result3 = teachSwitchIBLL.FindFirst("ssosystem"); - ViewBag.SSOSystemSwitch = result3; + var result3 = teachSwitchIBLL.GetFirst("ssosystem"); + ViewBag.SSOSystemSwitch = result3.status == "1" ? true : false; + ViewBag.SSOSystemUrl = result3.url; //微信快捷登录 var result4 = teachSwitchIBLL.FindFirst("wxloginforpc"); ViewBag.WeixinLoginSwitch = result4; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default.cshtml index b33ad628c..771321973 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default.cshtml @@ -67,13 +67,13 @@ } @if (ViewBag.FeixinSwitch) { - + 飞星下载 } @if (ViewBag.SSOSystemSwitch) { - 网上办事大厅 + 网上办事大厅 } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFive.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFive.cshtml index 35c262a25..da39be4ce 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFive.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFive.cshtml @@ -21,13 +21,13 @@
@if (ViewBag.FeixinSwitch) { - + 飞星下载 } @if (ViewBag.SSOSystemSwitch) { - 网上办事大厅 + 网上办事大厅 } @if (ViewBag.WeixinLoginSwitch) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFour.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFour.cshtml index d99c081c1..e1a32d974 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFour.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFour.cshtml @@ -74,11 +74,11 @@
@if (ViewBag.SSOSystemSwitch) { - 网上办事大厅 + 网上办事大厅 } @if (ViewBag.FeixinSwitch) { - + 飞星下载 } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageOne.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageOne.cshtml index 4cad4fb0e..14e33ada6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageOne.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageOne.cshtml @@ -21,13 +21,13 @@
@if (ViewBag.FeixinSwitch) { - + 飞星下载 } @if (ViewBag.SSOSystemSwitch) { - 网上办事大厅 + 网上办事大厅 }
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven.cshtml index 36198b579..df9a788c3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven.cshtml @@ -61,11 +61,11 @@ @if (ViewBag.SSOSystemSwitch) { - 网上办大事大厅 + 网上办大事大厅 } @if (ViewBag.FeixinSwitch) { - 飞星下载 + 飞星下载 }
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix.cshtml index 157e3358b..8dadbcf85 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix.cshtml @@ -71,11 +71,11 @@ } @if (ViewBag.SSOSystemSwitch) { - 网上办事大厅 + 网上办事大厅 } @if (ViewBag.FeixinSwitch) { - 飞星下载 + 飞星下载 }
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageThree.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageThree.cshtml index c7c879004..471dba414 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageThree.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageThree.cshtml @@ -79,11 +79,11 @@
@if (ViewBag.SSOSystemSwitch) { - 网上办事大厅 + 网上办事大厅 } @if (ViewBag.FeixinSwitch) { - + 飞星下载 } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageTwo.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageTwo.cshtml index 2f8c7ad2e..98133df13 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageTwo.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageTwo.cshtml @@ -73,11 +73,11 @@
@if (ViewBag.SSOSystemSwitch) { - 网上办事大厅 + 网上办事大厅 } @if (ViewBag.FeixinSwitch) { - + 飞星下载 } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachSwitch/TeachSwitchEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachSwitch/TeachSwitchEntity.cs index d0ad36a54..d8f387edb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachSwitch/TeachSwitchEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachSwitch/TeachSwitchEntity.cs @@ -29,6 +29,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("TYPE")] public string type { get; set; } + /// + /// 链接地址 + /// + [Column("URL")] + public string url { get; set; } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachSwitch/TeachSwitchService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachSwitch/TeachSwitchService.cs index 97e966393..b6cc94edb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachSwitch/TeachSwitchService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachSwitch/TeachSwitchService.cs @@ -45,7 +45,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var fxEntity = new TeachSwitchEntity() { status = "0", - type = "fx" + type = "fx", + url= "/feixin.exe" }; fxEntity.Create(); this.BaseRepository().Insert(fxEntity); @@ -56,7 +57,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var jsEntity = new TeachSwitchEntity() { status = "0", - type = "ssosystem" + type = "ssosystem", + url= "/SSOSystem/Index" }; jsEntity.Create(); this.BaseRepository().Insert(jsEntity); @@ -73,12 +75,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration this.BaseRepository().Insert(jsEntity); } var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.ID, - t.status, - t.type - "); + strSql.Append("SELECT t.* "); strSql.Append(" FROM TeachSwitch t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject();