218 lines
7.7 KiB
Plaintext
218 lines
7.7 KiB
Plaintext
@model WX.CRM.Model.Entity.BAS_INNERUSER
|
||
@{
|
||
ViewBag.Title = "客户管理系统--登录";
|
||
Layout = "~/Views/Shared/_Index_LayoutNewEdit.cshtml";
|
||
}
|
||
|
||
|
||
<style>
|
||
body {
|
||
background-image: url(/image/loginbg.png);
|
||
}
|
||
|
||
.mancontent {
|
||
/*background: #FA2;*/
|
||
width: 350px;
|
||
min-height: 400px;
|
||
position: fixed;
|
||
left: 50%;
|
||
top: 50%;
|
||
z-index: 11;
|
||
/*设定这个div的margin-top的负值为自身的高度的一半,margin-left的值也是自身的宽度的一半的负值.*/
|
||
/*宽为400,那么margin-top为-200px*/
|
||
/*高为200那么margin-left为-100px;*/
|
||
margin: -220px 0 0 -175px;
|
||
background-color: white;
|
||
border-radius: 10px;
|
||
}
|
||
|
||
.mancontent .layui-input {
|
||
height: 50px;
|
||
}
|
||
|
||
.copyright {
|
||
width: 100%;
|
||
text-align: center;
|
||
position: fixed;
|
||
top: 90%;
|
||
font-family: MicrosoftYaHei;
|
||
font-size: 14px;
|
||
color: #999999;
|
||
}
|
||
|
||
.title {
|
||
font-family: PingFang-SC-Bold;
|
||
font-size: 17px;
|
||
color: #969CAE;
|
||
letter-spacing: 0;
|
||
font-weight: 500;
|
||
width: 100%;
|
||
text-align: center;
|
||
height: 50px;
|
||
line-height: 50px;
|
||
}
|
||
|
||
.layui-input-block {
|
||
margin-left: 20px;
|
||
margin-right: 20px;
|
||
}
|
||
|
||
.inputIcon {
|
||
background-repeat: no-repeat;
|
||
background-position: 20px 50%;
|
||
text-indent: 60px;
|
||
}
|
||
|
||
.icon_eid {
|
||
background-image: url(/image/icon/eid.png);
|
||
}
|
||
|
||
.icon_pwd {
|
||
background-image: url(/image/icon/password.png);
|
||
}
|
||
|
||
.icon_zuoji {
|
||
background-image: url(/image/icon/zuoji.png);
|
||
}
|
||
|
||
.icon_yzm {
|
||
background-image: url(/image/icon/yanzhengma.png);
|
||
}
|
||
/*Webkit browsers*/
|
||
::-webkit-input-placeholder {
|
||
font-family: PingFang-SC-Medium;
|
||
font-size: 14px;
|
||
color: #BEBFC4;
|
||
letter-spacing: 0;
|
||
}
|
||
/*Mozilla Firefox 4 to 8*/
|
||
|
||
:-moz-placeholder {
|
||
font-family: PingFang-SC-Medium;
|
||
font-size: 14px;
|
||
color: #BEBFC4;
|
||
letter-spacing: 0;
|
||
}
|
||
/*Mozilla Firefox 19+*/
|
||
:moz-placeholder {
|
||
font-family: PingFang-SC-Medium;
|
||
font-size: 14px;
|
||
color: #BEBFC4;
|
||
letter-spacing: 0;
|
||
}
|
||
/*Internet Explorer 10+*/
|
||
:-ms-input-placeholder {
|
||
font-family: PingFang-SC-Medium;
|
||
font-size: 14px;
|
||
color: #BEBFC4;
|
||
letter-spacing: 0;
|
||
}
|
||
</style>
|
||
|
||
<div class="mancontent">
|
||
<div style="background-repeat:no-repeat; background-position:center;margin-top: 20px;"></div>
|
||
@*<div style="width:100%;height:39px;background-image:url(/image/loginLogo2.png) ; background-repeat:no-repeat; background-position:center;margin-top: 20px;"></div>*@
|
||
<div class="title">后台登录</div>
|
||
|
||
<form id="wocaaa" class="layui-form" action="" style="margin-bottom: 50px;">
|
||
<div class="layui-form-item">
|
||
<div class="layui-input-block my_form_iterm">
|
||
<input type="text" name="map_EID" lay-verify="required" lay-reqtext="工号不能为空!" autocomplete="off" placeholder="请输入工号" class="layui-input icon_eid inputIcon">
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<div class="layui-input-block my_form_iterm">
|
||
<input type="password" name="map_PASSWORD2" lay-verify="required" lay-reqtext="请您输入密码!" placeholder="请输入密码" autocomplete="off" class="layui-input icon_pwd inputIcon">
|
||
</div>
|
||
</div>
|
||
@if (ViewBag.CTI_VER == (int)WX.CRM.Model.Enum.CTI_VER.深海捷移动坐席 ||
|
||
ViewBag.CTI_VER == (int)WX.CRM.Model.Enum.CTI_VER.深海捷固定坐席 ||
|
||
ViewBag.CTI_VER == (int)WX.CRM.Model.Enum.CTI_VER.和声 ||
|
||
ViewBag.CTI_VER == (int)WX.CRM.Model.Enum.CTI_VER.艾讯 ||
|
||
ViewBag.CTI_VER == (int)WX.CRM.Model.Enum.CTI_VER.艾讯new)
|
||
{
|
||
<div class="layui-form-item">
|
||
<div class="layui-input-block my_form_iterm">
|
||
<input type="text" name="map_FJH" id="map_FJH" placeholder="请输分机号码" autocomplete="off" class="layui-input icon_zuoji inputIcon">
|
||
</div>
|
||
</div>
|
||
}
|
||
<div class="layui-form-item" id="divcode" style="display:none">
|
||
<div class="layui-input-block my_form_iterm">
|
||
<input type="text" id="VCODE" name="map_SnCode" @*lay-verify="required"*@ placeholder="请输入验证码" autocomplete="off" class="layui-input icon_yzm inputIcon" style="width:180px;display:-webkit-inline-box;vertical-align:middle;">
|
||
<img id="valiCode" style="cursor: pointer;vertical-align:middle;" onclick="ShowNewCode(this)" alt="验证码" />
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<button class="layui-btn layui-btn-ok" lay-submit lay-filter="formDemo" style="width:310px;margin-left:20px;height:52px;">登陆</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
@*<div class="copyright">Copyright © 2019 懂牛股票版权所有 未经许可不得复制、转载或摘编,违者必究!</div>*@
|
||
<script>
|
||
layui.use('form', function () {
|
||
var isneedcode = "@Html.Raw(ViewBag.NeedCode)";
|
||
if (isneedcode == "1") {
|
||
$("#divcode").removeAttr("style");
|
||
$("#VCODE").attr("lay-verify", "required").attr("lay-reqtext", "验证码不能为空!");
|
||
}
|
||
var form = layui.form;
|
||
var layer = layui.layer;
|
||
var redecturl = "@Html.Raw(Request.QueryString["ReturnUrl"])";
|
||
//监听提交
|
||
form.on('submit(formDemo)', function (data) {
|
||
//console.log(data.field);
|
||
//layer.alert(JSON.stringify(data.field), {
|
||
// title: '最终的提交信息'
|
||
//})
|
||
var loadingindex = layer.load(3, { shade: false });
|
||
$.ajax({
|
||
type: "POST",
|
||
url: "LogOn",
|
||
data: data.field,
|
||
dataType: "json",
|
||
success: function (da) {
|
||
layer.close(loadingindex);
|
||
if (da.result == true) {
|
||
layer.msg('登陆成功!', { icon: 1 });
|
||
if (redecturl != "") {
|
||
location.href = redecturl;
|
||
}
|
||
else {
|
||
location.href = "/";
|
||
}
|
||
} else {
|
||
layer.msg(da.retmsg, { icon: 2 });
|
||
$("#valiCode").attr("src", "GetValidateCode?y=" + GetGuid());
|
||
if (da.retcode == 10) {//如果等于10,表明需要需要打开验证码
|
||
$("#divcode").removeAttr("style");
|
||
$("#VCODE").attr("lay-verify", "required").attr("lay-reqtext", "验证码不能为空!");
|
||
}
|
||
}
|
||
},
|
||
error: function () {
|
||
layer.close(loadingindex);
|
||
layer.msg('操作失败!', { icon: 2 });
|
||
}
|
||
});
|
||
return false;
|
||
|
||
});
|
||
//各种基于事件的操作,下面会有进一步介绍
|
||
});
|
||
$(function () {
|
||
$("#valiCode").attr("src", "GetValidateCode?y=" + GetGuid());
|
||
});
|
||
function ShowNewCode(img) {
|
||
$(img).attr("src", "GetValidateCode?y=" + GetGuid());
|
||
}
|
||
</script>
|
||
<script type="text/javascript">
|
||
console.log(top);
|
||
console.log(self);
|
||
if (top != self) {
|
||
if (top.location != self.location)
|
||
top.location = self.location;
|
||
}
|
||
</script>
|