var __root_dir__ = ""; var __version__ = "v1.6.2"; var __lang__ = "cn"; var eyou_basefile = "/index.php";
  • 账号登录
  • 手机登录
//切换账号登录与手机号登录 $(".tab_list li").click(function(){ var index = $(this).attr('data-index'); $(".tab_list li").each(function(){ $(this).removeClass('current'); }); $(".item").each(function(i,v){ if (index == i){ $(this).css('display','block'); } else{ $(this).css('display','none'); } }); $(this).addClass('current'); }); $(document).keydown(function(event) { if (event.keyCode == 13) { var index = $(".tab_list .current").attr('data-index'); if (0 == index) { $('input[name=submit]').trigger("click"); }else if(1 == index){ checkMobileUserLogin1649732103(); } } }); function fleshVerify() { var src = "/index.php?m=api&c=Ajax&a=vertify&type=users_login"; if (src.indexOf('?') > -1) { src += '&'; } else { src += '?'; } src += 'r=' + Math.floor(Math.random() * 100); $('#imgVerifys').attr('src', src); } $(function() { $('input[name=submit]').on('click', function() { var username = $('input[name=username]'); var password = $('input[name=password]'); if (username.val() == '') { layer.msg('用户名不能为空!', { time: 1500, icon: 5 }); username.focus(); return false; } if (password.val() == '') { layer.msg('密码不能为空!', { time: 1500, icon: 5 }); password.focus(); return false; } layer_loading('正在处理'); $.ajax({ // async:false, url: "/index.php?m=user&c=Users&a=login", data: $('#theForm').serialize(), type: 'post', dataType: 'json', success: function(res) { if (1 == res.code) { if (5 == res.data.status) { layer.alert(res.msg, { icon: 5, title: false, closeBtn: false }, function() { window.location.href = res.url; }); } else { window.location.href = res.url; } } else { layer.closeAll(); if ('vertify' == res.data.status) { fleshVerify(); } if (2 == res.data.status) { showErrorAlert(res.msg, 4); } else { layer.msg(res.msg, { icon: 5, time: 1500 }); } } }, error: function(e) { layer.closeAll(); showErrorAlert(e.responseText); } }); }); });