@@ -3,9 +3,17 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap"> | <div class="lr-form-wrap"> | ||||
<div class="col-xs-12 lr-form-item" data-table="TeachSwitch" > | |||||
<div class="lr-form-item-title">功能开启</div> | |||||
<div id="status"></div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TeachSwitch"> | |||||
<div class="lr-form-item-title">开关名称<font face="宋体">*</font></div> | |||||
<input id="type" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TeachSwitch"> | |||||
<div class="lr-form-item-title">功能开启<font face="宋体">*</font></div> | |||||
<div id="status" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TeachSwitch"> | |||||
<div class="lr-form-item-title">链接地址<font face="宋体">*</font></div> | |||||
<input id="url" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TeachSwitch/Form.js") | @Html.AppendJsFile("/Areas/EducationalAdministration/Views/TeachSwitch/Form.js") |
@@ -80,6 +80,8 @@ var bootstrap = function ($, learun) { | |||||
return '网上办事大厅开关'; | return '网上办事大厅开关'; | ||||
} else if (val == 'wxloginforpc') { | } else if (val == 'wxloginforpc') { | ||||
return '微信快捷登录PC端'; | return '微信快捷登录PC端'; | ||||
} else { | |||||
return val; | |||||
} | } | ||||
} | } | ||||
@@ -96,6 +98,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "链接地址", name: "url", width: 200, align: "left" }, | |||||
], | ], | ||||
mainId: 'ID', | mainId: 'ID', | ||||
isPage: true | isPage: true | ||||
@@ -221,11 +221,14 @@ namespace Learun.Application.Web.Controllers | |||||
var result = teachSwitchIBLL.FindFirst("js"); | var result = teachSwitchIBLL.FindFirst("js"); | ||||
ViewBag.TeachSwitch = result; | 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"); | var result4 = teachSwitchIBLL.FindFirst("wxloginforpc"); | ||||
ViewBag.WeixinLoginSwitch = result4; | ViewBag.WeixinLoginSwitch = result4; | ||||
@@ -67,13 +67,13 @@ | |||||
} | } | ||||
@if (ViewBag.FeixinSwitch) | @if (ViewBag.FeixinSwitch) | ||||
{ | { | ||||
<a href="/feixin.exe" class="down"> | |||||
<a href="@ViewBag.FeiXinUrl" class="down"> | |||||
<img src="~/Content/images/LoginPage/download.png" alt="" /> 飞星下载 | <img src="~/Content/images/LoginPage/download.png" alt="" /> 飞星下载 | ||||
</a> | </a> | ||||
} | } | ||||
@if (ViewBag.SSOSystemSwitch) | @if (ViewBag.SSOSystemSwitch) | ||||
{ | { | ||||
<a href="/SSOSystem/Index" class="down downsso">网上办事大厅</a> | |||||
<a href="@ViewBag.SSOSystemUrl" class="down downsso">网上办事大厅</a> | |||||
} | } | ||||
<img src="~/Content/images/logins/login2.png" /> | <img src="~/Content/images/logins/login2.png" /> | ||||
<!--登录框 正常登录--> | <!--登录框 正常登录--> | ||||
@@ -21,13 +21,13 @@ | |||||
<div class="loginCon"> | <div class="loginCon"> | ||||
@if (ViewBag.FeixinSwitch) | @if (ViewBag.FeixinSwitch) | ||||
{ | { | ||||
<a href="/feixin.exe" class="down"> | |||||
<a href="@ViewBag.FeixinUrl" class="down"> | |||||
<img src="~/Content/images/LoginPage/download.png" alt="" /> 飞星下载 | <img src="~/Content/images/LoginPage/download.png" alt="" /> 飞星下载 | ||||
</a> | </a> | ||||
} | } | ||||
@if (ViewBag.SSOSystemSwitch) | @if (ViewBag.SSOSystemSwitch) | ||||
{ | { | ||||
<a href="/SSOSystem/Index" class="down downsso">网上办事大厅</a> | |||||
<a href="@ViewBag.SSOSystemUrl" class="down downsso">网上办事大厅</a> | |||||
} | } | ||||
@if (ViewBag.WeixinLoginSwitch) | @if (ViewBag.WeixinLoginSwitch) | ||||
{ | { | ||||
@@ -74,11 +74,11 @@ | |||||
<div style="text-align: right"> | <div style="text-align: right"> | ||||
@if (ViewBag.SSOSystemSwitch) | @if (ViewBag.SSOSystemSwitch) | ||||
{ | { | ||||
<a href="/SSOSystem/Index" class="down downsso">网上办事大厅</a> | |||||
<a href="@ViewBag.SSOSystemUrl" class="down downsso">网上办事大厅</a> | |||||
} | } | ||||
@if (ViewBag.FeixinSwitch) | @if (ViewBag.FeixinSwitch) | ||||
{ | { | ||||
<a href="/feixin.exe" class="down"> | |||||
<a href="@ViewBag.FeixinUrl" class="down"> | |||||
<img src="~/Content/images/LoginPage/download.png" alt="" /> 飞星下载 | <img src="~/Content/images/LoginPage/download.png" alt="" /> 飞星下载 | ||||
</a> | </a> | ||||
} | } | ||||
@@ -21,13 +21,13 @@ | |||||
<div class="loginBox commonClear"> | <div class="loginBox commonClear"> | ||||
@if (ViewBag.FeixinSwitch) | @if (ViewBag.FeixinSwitch) | ||||
{ | { | ||||
<a href="/feixin.exe" class="down"> | |||||
<a href="@ViewBag.FeixinUrl" class="down"> | |||||
<img src="~/Content/images/LoginPage/download.png" alt="" /> 飞星下载 | <img src="~/Content/images/LoginPage/download.png" alt="" /> 飞星下载 | ||||
</a> | </a> | ||||
} | } | ||||
@if (ViewBag.SSOSystemSwitch) | @if (ViewBag.SSOSystemSwitch) | ||||
{ | { | ||||
<a href="/SSOSystem/Index" class="down downsso">网上办事大厅</a> | |||||
<a href="@ViewBag.SSOSystemUrl" class="down downsso">网上办事大厅</a> | |||||
} | } | ||||
<div class="loginL"> | <div class="loginL"> | ||||
<div class="loginLimg"> | <div class="loginLimg"> | ||||
@@ -61,11 +61,11 @@ | |||||
<!-- <input type="button" class="btn btn-white btn-outline btn-lg btn-rounded progress-login" value="教师注册" style="cursor:pointer"> --> | <!-- <input type="button" class="btn btn-white btn-outline btn-lg btn-rounded progress-login" value="教师注册" style="cursor:pointer"> --> | ||||
@if (ViewBag.SSOSystemSwitch) | @if (ViewBag.SSOSystemSwitch) | ||||
{ | { | ||||
<a href="/SSOSystem/Index"><span class="bbh_bs">网上办大事大厅</span></a> | |||||
<a href="@ViewBag.SSOSystemUrl"><span class="bbh_bs">网上办大事大厅</span></a> | |||||
} | } | ||||
@if (ViewBag.FeixinSwitch) | @if (ViewBag.FeixinSwitch) | ||||
{ | { | ||||
<a href="/feixin.exe"><span class="bbh_bs bbh_sdow"><img src="~/Content/images/Login/login8-5.png" />飞星下载</span></a> | |||||
<a href="@ViewBag.FeixinUrl"><span class="bbh_bs bbh_sdow"><img src="~/Content/images/Login/login8-5.png" />飞星下载</span></a> | |||||
} | } | ||||
</div> | </div> | ||||
<div class="bbh"> | <div class="bbh"> | ||||
@@ -71,11 +71,11 @@ | |||||
} | } | ||||
@if (ViewBag.SSOSystemSwitch) | @if (ViewBag.SSOSystemSwitch) | ||||
{ | { | ||||
<a href="/SSOSystem/Index"><img src="~/Content/images/Login/login8-4.png" alt="" /><span class="bbh_span2">网上办事大厅</span></a> | |||||
<a href="@ViewBag.SSOSystemUrl"><img src="~/Content/images/Login/login8-4.png" alt="" /><span class="bbh_span2">网上办事大厅</span></a> | |||||
} | } | ||||
@if (ViewBag.FeixinSwitch) | @if (ViewBag.FeixinSwitch) | ||||
{ | { | ||||
<a href="/feixin.exe"><img src="~/Content/images/Login/login8-5.png" alt="" /><span class="bbh_span2">飞星下载</span></a> | |||||
<a href="@ViewBag.FeixinUrl"><img src="~/Content/images/Login/login8-5.png" alt="" /><span class="bbh_span2">飞星下载</span></a> | |||||
} | } | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -79,11 +79,11 @@ | |||||
<div style="text-align: right;margin-top: 10px;"> | <div style="text-align: right;margin-top: 10px;"> | ||||
@if (ViewBag.SSOSystemSwitch) | @if (ViewBag.SSOSystemSwitch) | ||||
{ | { | ||||
<a href="/SSOSystem/Index" class="down">网上办事大厅</a> | |||||
<a href="@ViewBag.SSOSystemUrl" class="down">网上办事大厅</a> | |||||
} | } | ||||
@if (ViewBag.FeixinSwitch) | @if (ViewBag.FeixinSwitch) | ||||
{ | { | ||||
<a href="/feixin.exe" class="down"> | |||||
<a href="@ViewBag.FeixinUrl" class="down"> | |||||
<img src="~/Content/images/LoginPage/download.png" alt="" /> 飞星下载 | <img src="~/Content/images/LoginPage/download.png" alt="" /> 飞星下载 | ||||
</a> | </a> | ||||
} | } | ||||
@@ -73,11 +73,11 @@ | |||||
<div style="text-align: right"> | <div style="text-align: right"> | ||||
@if (ViewBag.SSOSystemSwitch) | @if (ViewBag.SSOSystemSwitch) | ||||
{ | { | ||||
<a href="/SSOSystem/Index" class="down downsso">网上办事大厅</a> | |||||
<a href="@ViewBag.SSOSystemUrl" class="down downsso">网上办事大厅</a> | |||||
} | } | ||||
@if (ViewBag.FeixinSwitch) | @if (ViewBag.FeixinSwitch) | ||||
{ | { | ||||
<a href="/feixin.exe" class="down"> | |||||
<a href="@ViewBag.FeixinUrl" class="down"> | |||||
<img src="~/Content/images/LoginPage/download.png" alt="" /> 飞星下载 | <img src="~/Content/images/LoginPage/download.png" alt="" /> 飞星下载 | ||||
</a> | </a> | ||||
} | } | ||||
@@ -29,6 +29,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("TYPE")] | [Column("TYPE")] | ||||
public string type { get; set; } | public string type { get; set; } | ||||
/// <summary> | |||||
/// 链接地址 | |||||
/// </summary> | |||||
[Column("URL")] | |||||
public string url { get; set; } | |||||
#endregion | #endregion | ||||
@@ -45,7 +45,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var fxEntity = new TeachSwitchEntity() | var fxEntity = new TeachSwitchEntity() | ||||
{ | { | ||||
status = "0", | status = "0", | ||||
type = "fx" | |||||
type = "fx", | |||||
url= "/feixin.exe" | |||||
}; | }; | ||||
fxEntity.Create(); | fxEntity.Create(); | ||||
this.BaseRepository().Insert(fxEntity); | this.BaseRepository().Insert(fxEntity); | ||||
@@ -56,7 +57,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var jsEntity = new TeachSwitchEntity() | var jsEntity = new TeachSwitchEntity() | ||||
{ | { | ||||
status = "0", | status = "0", | ||||
type = "ssosystem" | |||||
type = "ssosystem", | |||||
url= "/SSOSystem/Index" | |||||
}; | }; | ||||
jsEntity.Create(); | jsEntity.Create(); | ||||
this.BaseRepository().Insert(jsEntity); | this.BaseRepository().Insert(jsEntity); | ||||
@@ -73,12 +75,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
this.BaseRepository().Insert(jsEntity); | this.BaseRepository().Insert(jsEntity); | ||||
} | } | ||||
var strSql = new StringBuilder(); | 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(" FROM TeachSwitch t "); | ||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||