function Login() { var telephone = $("#telephone").val(); var password = $("#password").val(); if (telephone.trim() == '') { mui.toast('请输入帐户', { duration: 'long', type: 'div' }); $('#telephone').focus(); return; } var re = /^1\d{10}$/; if (!re.test(telephone)) { mui.toast('手机号码格式不正确,必须为11位的手机号码', { duration: 'long', type: 'div' }); $('#telephone').focus(); return; } if (password.trim() == '') { mui.toast('请输入密码', { duration: 'long', type: 'div' }); $('#password').focus(); return; } var t = mui.showLoading("登陆中..", "div"); $.post("/MobileAccount/UserLogin", { "Complainttelephone": telephone, "password": password }, function (data) { mui.hideLoading(t); if (data.code == 200) { mui.showLoading("登陆成功,正在跳转..", "div"); window.location = "/Complaint/NewComplaint"; } else { mui.toast(data.msg, { duration: 'long', type: 'div' }); } }) }