@@ -442,7 +442,7 @@ namespace Learun.Application.Organization | |||
{ | |||
try | |||
{ | |||
return userService.GetEntityByName(mobile); | |||
return userService.GetEntityByMobile(mobile); | |||
} | |||
catch (Exception ex) | |||
@@ -154,7 +154,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
//奖罚情况 | |||
empInfo.TeacherEncourgementList = teacherEncourgementIBLL.GetListByEmpId(empInfo.EmpId).OrderByDescending(x => x.EncourgeDate).ToList(); | |||
empInfo.TeacherPunishmentList = teacherPunishmentIBLL.GetListByEmpId(empInfo.EmpId).OrderByDescending(x => x.StartTime).ToList(); | |||
} | |||
return View(empInfo); | |||
@@ -302,12 +302,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
entity.resume = WebHelper.HtmlEncode(entity.resume); | |||
entity.SyncFlag = false; | |||
var model = empInfoIBLL.GetEmpInfoEntityByEmpNo(entity.EmpNo); | |||
var model_mobile = empInfoIBLL.GetEmpInfoEntityByMobile(entity.mobile); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
if (model != null) | |||
{ | |||
return Fail("职工编号已存在!"); | |||
} | |||
if (model_mobile != null) | |||
{ | |||
return Fail("手机号已存在!"); | |||
} | |||
} | |||
else | |||
{ | |||
@@ -315,6 +320,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return Fail("职工编号已存在!"); | |||
} | |||
if (model_mobile != null && model_mobile.EmpId != keyValue) | |||
{ | |||
return Fail("手机号已存在!"); | |||
} | |||
entity.SyncFlag = true; | |||
//判断排课同步数据是否存在:若存在,清除同步数据; | |||
var arrangeLessonSyncList = arrangeLessonSyncIBLL.GetArrangeLessonSyncListByTableId(keyValue); | |||
@@ -104,7 +104,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
@@ -1,330 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "FormAdd"; | |||
Layout = null; | |||
} | |||
<!-- saved from url=(0075)http://123.57.209.16:8903/EducationalAdministration/EmpInfoEnternal/FormAdd --> | |||
<html> | |||
<head> | |||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |||
<meta name="renderer" content="webkit"> | |||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | |||
<meta name="format-detection" content="telephone=no"> | |||
<link rel="shortcut icon" href=""> | |||
<title>数字化校园-教师注册</title> | |||
<meta name="keywords" content="数字化校园-教师注册"> | |||
<meta name="description" content="数字化校园-教师注册"> | |||
<link href="~/Areas/PersonnelManagement/Views/VisitorInfo/css/font-awesome.css" rel="stylesheet" /> | |||
<link href="~/Areas/PersonnelManagement/Views/VisitorInfo/css/common.css" rel="stylesheet" /> | |||
<link href="~/Areas/PersonnelManagement/Views/VisitorInfo/css/layui.css" rel="stylesheet" /> | |||
<link href="~/Areas/PersonnelManagement/Views/VisitorInfo/css/fromAdd.css" rel="stylesheet" /> | |||
<link href="~/Areas/PersonnelManagement/Views/VisitorInfo/css/laydate.css" rel="stylesheet" /> | |||
<link href="~/Areas/PersonnelManagement/Views/VisitorInfo/css/layer.css" rel="stylesheet" /> | |||
<link href="~/Areas/PersonnelManagement/Views/VisitorInfo/css/code.css" rel="stylesheet" /> | |||
</head> | |||
<body> | |||
<div class="header"> | |||
<div class="fromSec"> | |||
<a href="">数字化智慧校园</a> <span class="headerLine">|</span> <span>教职工信息注册</span> | |||
</div> | |||
</div> | |||
<div class="warpper" id="app"> | |||
<!-- / index_sec5 --> | |||
<div class="chickForm_sec"> | |||
<div class="fromSec"> | |||
<div class="chickT">注册</div> | |||
<form class="layui-form" action=""> | |||
<!-- / chickForm_sec1 --> | |||
<div class="chickForm_sec1"> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 姓名</span> | |||
<input type="text" id="EmpNo" name="EmpNo" lay-verify="required" placeholder="请输入职工编号" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 电话</span> | |||
<input id="EmpName" type="text" name="EmpName" lay-verify="required" placeholder="请输入姓名" class="layui-input"> | |||
</div> | |||
</div> | |||
<div class="chickInput yz"> | |||
<p> | |||
<span class="chickInputLable"><span>*</span> 图形验证</span> | |||
<input id="EmpName" type="text" name="EmpName" lay-verify="required" placeholder="请输入内容" class="layui-input"> | |||
</p> | |||
<div class="variCode"> | |||
<img src="~/image/verCode.png" /> | |||
</div> | |||
</div> | |||
<div class="chickInput yz"> | |||
<p> | |||
<span class="chickInputLable"><span>*</span> 短信验证</span> | |||
<input id="EmpName" type="text" name="EmpName" lay-verify="required" placeholder="请输入内容" class="layui-input"> | |||
</p> | |||
<div class="variCode"> | |||
<input type="button" id="btn" value="获取验证码" onclick="settime(this)" /> | |||
</div> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 来访原因</span> | |||
<input id="EmpName" type="text" name="EmpName" lay-verify="required" placeholder="请输入原因" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 备注</span> | |||
<input id="EmpName" type="text" name="EmpName" lay-verify="required" placeholder="请输入内容" class="layui-input"> | |||
</div> | |||
<!-- / chickForm_sec1 --> | |||
<div class="chickBtn" lay-submit="" lay-filter="*">提交</div> | |||
</form> | |||
</div> | |||
</div> | |||
</div> | |||
<img id="fromBg" src="~/Areas/PersonnelManagement/Views/VisitorInfo/image/from1.png" /> | |||
<div class="footer"> Copyright © 2019 数字化智慧校园 版权所有</div> | |||
@*<script src="~/Content/js/jquery.min.js"></script> | |||
<script src="~/Content/layui/layui.all.js"></script> | |||
<script src="~/Content/vue/vue.js"></script>*@ | |||
<script src="~/Areas/PersonnelManagement/Views/VisitorInfo/js/jquery.min.js"></script> | |||
<script src="~/Areas/PersonnelManagement/Views/VisitorInfo/js/layui.all.js"></script> | |||
<script src="~/Areas/PersonnelManagement/Views/VisitorInfo/js/vue.js"></script> | |||
<script> | |||
var today = formatDateTimesM(); | |||
layui.use(['form', 'laydate', 'upload'], function () { | |||
var form = layui.form; | |||
//登录按钮点击 | |||
form.on('submit(*)', function (data) { | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/SaveForm?keyValue=", | |||
data: { strEntity: JSON.stringify(data.field) }, | |||
type: "POST", | |||
dataType: "json", | |||
async: true, | |||
cache: false, | |||
success: function (data) { | |||
console.log(data); | |||
layer.msg("注册成功"); | |||
alert("注册成功"); | |||
//location.reload(); | |||
location.href = "/home/index"; | |||
}, | |||
error: function (XMLHttpRequest, textStatus, errorThrown) { | |||
}, | |||
beforeSend: function () { | |||
}, | |||
complete: function () { | |||
} | |||
}); | |||
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 | |||
}); | |||
var laydate = layui.laydate; | |||
//时间选择 | |||
laydate.render({ | |||
elem: '#Birthday', | |||
min: today.y + '-' + today.m + '-' + today.d | |||
}); | |||
var upload = layui.upload; | |||
//上传图片 | |||
var uploadInst = upload.render({ | |||
elem: '#chickUpload', | |||
url: '/EducationalAdministration/EmpInfoEnternal/UploadImg', | |||
before: function (obj) { | |||
//预读本地文件示例,不支持ie8 | |||
obj.preview(function (index, file, result) { | |||
$('#chickUpload').html('<img src="' + result + '" alt="">') //图片链接(base64) | |||
}); | |||
}, | |||
done: function (res) { | |||
//如果上传失败 | |||
if (res.code != 200) { | |||
return layer.msg('上传失败'); | |||
} else { | |||
$("#Photo").val(res.data.folderId) | |||
} | |||
//上传成功 | |||
}, | |||
error: function () { | |||
//演示失败状态,并实现重传 | |||
var demoText = $('#demoText'); | |||
demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>'); | |||
demoText.find('.demo-reload').on('click', function () { | |||
uploadInst.upload(); | |||
}); | |||
} | |||
}); | |||
//监听校区 | |||
form.on('select(F_CompanyId)', function (data) { | |||
//绑定部门 | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "classdata" + "&where=" + "F_CompanyId='" + data.value + "'", | |||
async: false, | |||
success: function (msg) { | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, function (i, item) { | |||
str += '<option value="' + item.f_departmentid + '">' + item.f_fullname + '</option>' | |||
}) | |||
$("#F_DepartmentId").html(str); | |||
}, | |||
}); | |||
form.render(); | |||
}); | |||
}); | |||
$(window).load(function () { | |||
$('.chickInputBoxs input').attr('lay-verify', 'required'); | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "company", | |||
async: false, | |||
success: function (msg) { | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, function (i, item) { | |||
str += '<option value="' + item.f_companyid + '">' + item.f_fullname + '</option>' | |||
}) | |||
$("#F_CompanyId").html(str); | |||
}, | |||
}); | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdDeptInfo", | |||
async: false, | |||
success: function (msg) { | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, function (i, item) { | |||
str += '<option value="' + item.deptno + '">' + item.deptname + '</option>' | |||
}) | |||
$("#DeptNo").html(str); | |||
}, | |||
}); | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "classdata", | |||
async: false, | |||
success: function (msg) { | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, function (i, item) { | |||
str += '<option value="' + item.id + '">' + item.name + '</option>' | |||
}) | |||
$("#F_DepartmentId").html(str); | |||
}, | |||
}); | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "BCdNationality", | |||
async: false, | |||
success: function (msg) { | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, function (i, item) { | |||
str += '<option value="' + item.nationalityno + '">' + item.nationality + '</option>' | |||
}) | |||
$("#NationalityNo").html(str); | |||
}, | |||
}); | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "BCdPartyFace", | |||
async: false, | |||
success: function (msg) { | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, | |||
function (i, item) { | |||
str += '<option value="' + item.partyfaceno + '">' + item.partyface + '</option>' | |||
}); | |||
$("#PartyFaceNo").html(str); | |||
}, | |||
}); | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "BCdCultureDegree", | |||
async: false, | |||
success: function (msg) { | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, function (i, item) { | |||
str += '<option value="' + item.culturedegreeno + '">' + item.culturedegree + '</option>' | |||
}) | |||
$("#CultureDegreeNo").html(str); | |||
}, | |||
}); | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "BCdDegree", | |||
async: false, | |||
success: function (msg) { | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, function (i, item) { | |||
str += '<option value="' + item.degreeno + '">' + item.degreename + '</option>' | |||
}) | |||
$("#DegreeNo").html(str); | |||
}, | |||
}); | |||
renderForm() | |||
}) | |||
//重新渲染表单 | |||
function renderForm() { | |||
layui.use('form', function () { | |||
var form = layui.form//高版本建议把括号去掉,有的低版本,需要加() | |||
form.render(); | |||
}); | |||
} | |||
function formatDateTimesM() { | |||
var date = new Date(1960, 0, 0); | |||
var y = date.getFullYear(); | |||
var m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1; | |||
var d = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); | |||
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours(); | |||
var min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); | |||
return { | |||
y: y, | |||
m: m, | |||
d: d, | |||
h: h, | |||
min: min | |||
} | |||
}; | |||
</script> | |||
<script type="text/javascript"> | |||
var countdown = 30; | |||
function settime(obj) { | |||
console.log(obj) | |||
if (countdown == 0) { | |||
obj.removeAttribute("disabled"); | |||
obj.value = "获取验证码"; | |||
countdown = 30; | |||
return; | |||
} else { | |||
obj.setAttribute("disabled", true); | |||
obj.value = "重新发送(" + countdown + ")"; | |||
countdown--; | |||
} | |||
setTimeout(function () { | |||
settime(obj) | |||
} | |||
, 1000) | |||
} | |||
</script> | |||
</body> | |||
</html> |
@@ -22,6 +22,7 @@ using System.Text.RegularExpressions; | |||
using Quanjiang.DigitalScholl.SendSms; | |||
using System.Collections.Generic; | |||
using Learun.Cache.Redis; | |||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||
namespace Learun.Application.Web.Controllers | |||
{ | |||
@@ -44,6 +45,7 @@ namespace Learun.Application.Web.Controllers | |||
private AnnexesFileIBLL annexesFileIbll = new AnnexesFileBLL(); | |||
WeChatDevelopIBLL weChatDevelopIbll = new WeChatDevelopBLL(); | |||
private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL(); | |||
private VisitorInfoIBLL visitorInfoIBLL = new VisitorInfoBLL(); | |||
#endregion | |||
private readonly ISms _aliyunSms = new AliyunSms(); | |||
CacheByRedis _redis = new CacheByRedis(); | |||
@@ -462,7 +464,7 @@ namespace Learun.Application.Web.Controllers | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -1129,7 +1131,7 @@ namespace Learun.Application.Web.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public async Task<ActionResult> FindPassword(string phone, string phonecode, string newPassword,string smsType) | |||
public async Task<ActionResult> FindPassword(string phone, string phonecode, string newPassword, string smsType) | |||
{ | |||
if (string.IsNullOrEmpty(phone)) | |||
{ | |||
@@ -1145,7 +1147,7 @@ namespace Learun.Application.Web.Controllers | |||
} | |||
var type = (SmsType)Enum.Parse(typeof(SmsType), smsType); | |||
var smscode = _redis.Read<string>($"checkcode_{type}_{phone}"); | |||
if (!string.IsNullOrEmpty(smscode)) | |||
{ | |||
@@ -1165,8 +1167,8 @@ namespace Learun.Application.Web.Controllers | |||
{ | |||
return Fail("账户被系统锁定,请联系管理员!"); | |||
} | |||
userEntity.F_Password = Md5Helper.Encrypt(DESEncrypt.Encrypt(newPassword.ToLower(), userEntity.F_Secretkey).ToLower(), 32).ToLower(); | |||
userBll.SaveEntity(userEntity.F_UserId, userEntity); | |||
userBll.setPassword(userEntity.F_UserId, newPassword); | |||
//删除验证码 | |||
_redis.Remove($"checkcode_{type}_{phone}"); | |||
@@ -1176,10 +1178,55 @@ namespace Learun.Application.Web.Controllers | |||
{ | |||
return Fail("验证码已过期,请重新获取!"); | |||
} | |||
return Success("您的密码已发送,请重新登录!"); | |||
return Success("密码修改成功,请重新登录!"); | |||
} | |||
#endregion | |||
/// <summary> | |||
/// 访客注册 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <param name="verifycode">图片验证码</param> | |||
/// <param name="phonecode">手机验证码</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult SaveVisitor(string keyValue, string strEntity, string verifycode, string phonecode) | |||
{ | |||
VisitorInfoEntity entity = strEntity.ToObject<VisitorInfoEntity>(); | |||
var VisitorInfoData = visitorInfoIBLL.GetEntityByPhone(entity.VPhone); | |||
if (string.IsNullOrEmpty(keyValue) && VisitorInfoData != null) | |||
return Fail("手机号已存在!"); | |||
else if (!string.IsNullOrEmpty(keyValue) && VisitorInfoData.VID != keyValue) | |||
return Fail("手机号已存在!"); | |||
//验证图片验证码 | |||
verifycode = Md5Helper.Encrypt(verifycode.ToLower(), 16); | |||
if (Session["session_verifycode"].IsEmpty() || verifycode != Session["session_verifycode"].ToString()) | |||
{ | |||
return Fail("图片验证码错误"); | |||
} | |||
//验证手机验证码 | |||
var type = (SmsType)Enum.Parse(typeof(SmsType), "0"); | |||
var smscode = _redis.Read<string>($"checkcode_{type}_{entity.VPhone}"); | |||
if (!string.IsNullOrEmpty(smscode)) | |||
{ | |||
if (smscode != phonecode) | |||
{ | |||
return Fail("手机验证码不正确,请核对!"); | |||
} | |||
} | |||
entity.VState = 0; | |||
entity.VApplyTime = DateTime.Now; | |||
visitorInfoIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 获取IP | |||
/// </summary> | |||
@@ -7264,7 +7264,6 @@ | |||
<Content Include="Areas\LR_Desktop\Views\MessageRind\UnreadIndex.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\Emp_Payroll\StatisticIndex.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\VisitorInfo\FormAdd.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\VisitorInfo\FormAdd2.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\Emp_PayrollOnce\Form.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\Emp_PayrollOnce\Index.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\Emp_PayrollOnce\StatisticIndex.cshtml" /> | |||
@@ -98,9 +98,11 @@ | |||
<div>北京金隅科技学校 数字化智慧校园 版权所有</div> | |||
<!--京ICP备13045367号--> | |||
</div> | |||
<script src="~/Content/jquery/jquery.md5.min.js"></script> | |||
<script src="~/Content/js/qrcode.min.js"></script> | |||
<script src="~/Content/layui/layui.all.js"></script> | |||
<script src="~/Content/vue/vue.js"></script> | |||
<script> | |||
var qrCodeBox = $('.qrCodeBox'); | |||
var loginForm = $('#loginForm'); | |||
@@ -140,6 +142,7 @@ | |||
alert('两次密码输入不一致!'); | |||
return; | |||
} | |||
newPassword = $.md5(newPassword); | |||
$.ajax({ | |||
url: "/Login/FindPassword", | |||
data: { phone: $('#phone').val(), phonecode: $('#phonecode').val(), newPassword: newPassword, smsType:2}, | |||
@@ -148,9 +151,11 @@ | |||
async: true, | |||
cache: false, | |||
success: function (data) { | |||
console.log(data); | |||
alert("修改成功"); | |||
location.href = "/home/index"; | |||
alert(data.info); | |||
if (data.code && data.code == 200) { | |||
location.href = "/home/index"; | |||
} | |||
}, | |||
error: function (XMLHttpRequest, textStatus, errorThrown) { | |||
}, | |||
@@ -27,6 +27,9 @@ | |||
<link id="layuicss-layer" rel="stylesheet" href="./files/css/layer.css" media="all"> | |||
<link id="layuicss-skincodecss" rel="stylesheet" href="./files/css/code.css" media="all">*@ | |||
<style> | |||
.phonecode { | |||
margin-top: -11px; | |||
} | |||
.variCode #btn { | |||
padding: 6px 4px; | |||
margin-top: 12px; | |||
@@ -56,17 +59,17 @@ | |||
<div class="chickForm_sec1"> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 姓名</span> | |||
<input type="text" id="EmpNo" name="EmpNo" lay-verify="required" placeholder="请输入姓名" class="layui-input"> | |||
<input type="text" id="VName" name="VName" lay-verify="required" placeholder="请输入姓名" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 电话</span> | |||
<input id="EmpName" type="text" name="EmpName" lay-verify="required" placeholder="请输入电话" class="layui-input"> | |||
<span class="chickInputLable"><span>*</span> 手机号</span> | |||
<input id="VPhone" type="text" name="VPhone" lay-verify="required" placeholder="请输入手机号" class="layui-input"> | |||
</div> | |||
</div> | |||
<div class="chickInput yz"> | |||
<p> | |||
<span class="chickInputLable"><span>*</span> 图形验证</span> | |||
<input id="verifycode" type="text" name="verifycode" lay-verify="required" placeholder="请输入内容" class="layui-input"> | |||
<input id="verifycode" type="text" name="verifycode" lay-verify="required" placeholder="请输入图形验证码" class="layui-input"> | |||
</p> | |||
<div class="variCode"> | |||
@@ -76,24 +79,24 @@ | |||
<div class="chickInput yz"> | |||
<p> | |||
<span class="chickInputLable"><span>*</span> 短信验证</span> | |||
<input id="phonecode" type="text" name="phonecode" lay-verify="required" placeholder="请输入内容" class="layui-input"> | |||
<input id="phonecode" type="text" name="phonecode" lay-verify="required" placeholder="请输入验证码" class="layui-input"> | |||
</p> | |||
<div class="variCode"> | |||
<div class="variCode phonecode"> | |||
<input type="button" id="btn" value="获取验证码" onclick="GetPhoneCode(this)" /> | |||
</div> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 申请理由</span> | |||
<input id="VReasons" type="text" name="VReasons" lay-verify="required" placeholder="请输入原因" class="layui-input"> | |||
<input id="VReasons" type="text" name="VReasons" lay-verify="required" placeholder="请输入申请理由" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 来访目的</span> | |||
<input id="VObjective" type="text" name="VObjective" lay-verify="required" placeholder="请输入原因" class="layui-input"> | |||
<span class="chickInputLable"> 来访目的</span> | |||
<input id="VObjective" type="text" name="VObjective" placeholder="请输入来访目的" class="layui-input"> | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 备注</span> | |||
<input id="VRemarks" type="text" name="VRemarks" lay-verify="required" placeholder="请输入内容" class="layui-input"> | |||
<span class="chickInputLable">备注</span> | |||
<input id="VRemarks" type="text" name="VRemarks" placeholder="请输入备注" class="layui-input"> | |||
</div> | |||
<!-- / chickForm_sec1 --> | |||
<div class="chickBtn" lay-submit="" lay-filter="*">提交</div> | |||
@@ -114,10 +117,10 @@ | |||
layui.use(['form', 'laydate', 'upload'], function () { | |||
var form = layui.form; | |||
//登录按钮点击 | |||
form.on('submit(*)', function (data) { | |||
$.ajax({ | |||
url: "/EducationalAdministration/EmpInfoEnternal/SaveForm?keyValue=", | |||
url: "/Login/SaveVisitor?keyValue=", | |||
data: { strEntity: JSON.stringify(data.field), verifycode: $('#verifycode').val(), phonecode: $('#phonecode').val() }, | |||
type: "POST", | |||
dataType: "json", | |||
@@ -125,9 +128,13 @@ | |||
cache: false, | |||
success: function (data) { | |||
console.log(data); | |||
alert("注册成功"); | |||
//location.reload(); | |||
location.href = "/home/index"; | |||
if (data.code == 200) { | |||
alert("注册成功"); | |||
location.href = "/home/index"; | |||
} else { | |||
alert(data.info); | |||
} | |||
}, | |||
error: function (XMLHttpRequest, textStatus, errorThrown) { | |||
}, | |||
@@ -200,7 +207,7 @@ | |||
//获取手机验证码 | |||
function GetPhoneCode(obj) { | |||
var phone = $('#phone').val(); | |||
var phone = $('#VPhone').val(); | |||
//图片验证码 | |||
var verifycode = $('#verifycode').val(); | |||
if (!verifycode) { | |||
@@ -218,7 +225,7 @@ | |||
}} | |||
$.ajax({ | |||
url: "/Login/GetCheckCode", | |||
data: { mobile: phone, smsType: 2 }, | |||
data: { mobile: phone, smsType: 0 }, | |||
type: "post", | |||
dataType: "json", | |||
success: function (res) { | |||
@@ -232,7 +239,7 @@ | |||
}; | |||
var countdown = 30; | |||
function settime(obj) { | |||
console.log(obj) | |||
//console.log(obj) | |||
if (countdown == 0) { | |||
obj.removeAttribute("disabled"); | |||
obj.value = "获取验证码"; | |||
@@ -359,6 +359,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public EmpInfoEntity GetEmpInfoEntityByMobile(string mobile) | |||
{ | |||
try | |||
{ | |||
return empInfoService.GetEmpInfoEntityByMobile(mobile); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public List<EmpInfoEntity> GetEmpInfoEntityByDepartment(string keyValue) | |||
{ | |||
try | |||
@@ -397,7 +418,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
public void UpdateAccount(string empId=null) | |||
public void UpdateAccount(string empId = null) | |||
{ | |||
try | |||
{ | |||
@@ -73,6 +73,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
void CheckAll(); | |||
EmpInfoEntity GetEmpInfoEntityByEmpNo(string keyValue); | |||
EmpInfoEntity GetEmpInfoEntityByMobile(string mobile); | |||
List<EmpInfoEntity> GetEmpInfoEntityByDepartment(string keyValue); | |||
void UpdateAccount(string empId = null); | |||
EmpInfoEntity GetEmpInfoEntityById(string id); | |||
@@ -324,6 +324,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public EmpInfoEntity GetEmpInfoEntityByMobile(string mobile) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<EmpInfoEntity>(x => x.mobile == mobile); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 教师年龄比例 | |||
/// </summary> | |||
@@ -71,16 +71,16 @@ namespace Quanjiang.DigitalScholl.SendSms | |||
switch (st) | |||
{ | |||
case SmsType.Register: | |||
result = ("SMS_137485060", JsonConvert.SerializeObject(new { code = randomNum }), randomNum); | |||
break; | |||
case SmsType.LoginBind: | |||
result = ("SMS_137485060", JsonConvert.SerializeObject(new { code = randomNum }), randomNum); | |||
result = ("SMS_217435176", JsonConvert.SerializeObject(new { code = randomNum }), randomNum); | |||
break; | |||
//case SmsType.LoginBind: | |||
// result = ("SMS_137485060", JsonConvert.SerializeObject(new { code = randomNum }), randomNum); | |||
// break; | |||
case SmsType.ForgetPassWord: | |||
result = ("SMS_137485060", JsonConvert.SerializeObject(new { code = randomNum }), randomNum); | |||
result = ("SMS_217425193", JsonConvert.SerializeObject(new { code = randomNum }), randomNum); | |||
break; | |||
case SmsType.FindPassWord: | |||
result = ("SMS_137485060", JsonConvert.SerializeObject(new { code = randomNum }), randomNum); | |||
result = ("SMS_217425193", JsonConvert.SerializeObject(new { code = randomNum }), randomNum); | |||
break; | |||
//case SmsType.LeaveNotification: | |||
// result = ("SMS_137485060", JsonConvert.SerializeObject(new { code = randomNum }), randomNum); | |||
@@ -4,10 +4,10 @@ | |||
<!--阿里云短信平台参数--> | |||
<add key="product" value="Dysmsapi" /> | |||
<add key="domain" value="dysmsapi.aliyuncs.com" /> | |||
<add key="accessId" value="LTAIv9edWmNRk2ai" /> | |||
<add key="accessSecret" value="iFBh4DYE7kwKACV4hhoGxDrILd63uL" /> | |||
<add key="accessId" value="LTAI5tLrUHMbLTbAoQpEukbN" /> | |||
<add key="accessSecret" value="KVZ9nCgCv2gljBMFzK0i471Wf0jbsp" /> | |||
<add key="regionIdForPop" value="cn-hangzhou" /> | |||
<add key="SignName" value="阿里云短信测试专用" /> | |||
<add key="SignName" value="北京金隅科技学校" /> | |||
<!--斑羚短信平台--> | |||
<add key="sdkappid" value="140009369387" /> | |||
<add key="appkey" value="4d2743a4233e5d8625eefa31f876721b" /> | |||