.top/login"); // var return_url = window.location.href; var return_url = "aHR0cDovL3d3dy52YmRhdGEuY24vb3JnLzMzZGM1M2ZhNWI1MjQyMzQ4MmZhMWVjYjA5MGY5MjE4"; var obj = new WxLogin({ id: "wx_login", appid: "wxfd006f88dd257183", scope: "snsapi_login", redirect_uri: url, state: return_url, style: "black", href: "" }); layer.open({ type: 1, title: false, closeBtn: 0, area: '450px', skin: 'layui-layer-nobg', //没有背景色 shadeClose: false, content: $('.login_layer') }); } // 登录前填信息 var before_login = ""; if (before_login == 1) { // 判断信息是否完整 // fillInfo(); changeLayer('.binding_layer') } // 各种提交 function goSubmit() { var dom = $(layer_type + ' .div-input>input') var is = 0 // 验证是否成功 // console.log(dom.length) dom.each(function(index, item){ if ($(item).val() == '' || $(item).hasClass('input-err')) { is ++ } }) if(is == 0) { switch (layer_type) { case '.code_login_layer': // 验证码登录 $.ajax({ type: "post", url: "/User/loginOnByPhone", dataType: "json", data: { 'mobile': $(layer_type + ' input[name="mobile"]').val(), 'code': $(layer_type + ' input[name="code"]').val(), 'login_type': 1 }, success: function(res) { if (res.status == 'success') { var url_str = window.location.href; var url = url_str.replace("user_before_login=1","user_before_login=0"); if (url == url_str) { window.location.reload(); }else{ window.location.href = url; } } else { layer.msg(res.msg); if (res.type == 3) { setTimeout(function() { changeLayer('.reg_layer') }, 2000) } } } }); break; case '.account_login_layer': // 账号密码 $.ajax({ type: "post", url: "/User/loginOnByPhone", async: false, dataType: "json", data: { 'mobile': $(layer_type + ' input[name="mobile"]').val(), 'code': $(layer_type + ' input[name="password"]').val(), 'login_type': 2 }, success: function(res) { if (res.status == 'success') { var url_str = window.location.href; var url = url_str.replace("user_before_login=1","user_before_login=0"); if (url == url_str) { window.location.reload(); }else{ window.location.href = url; } } else { layer.msg(res.msg); if (res.type == 3) { setTimeout(function() { changeLayer('.reg_layer') }, 2000) } } } }); break; case '.reg_layer': // 注册和忘记密码 case '.forget_paw_layer': if (layer_type == '.reg_layer' && !$(layer_type + ' input[type="checkbox"]')[0].checked) { layer.msg('请先认真阅读同意《动脉网用户使用协议》') break } $.ajax({ type: "post", url: "/User/regMobile", dataType: "json", data: { 'mobile': $(layer_type + ' input[name="mobile"]').val(), 'password': $(layer_type + ' input[name="password"]').val(), 'code': $(layer_type + ' input[name="code"]').val(), 'type': layer_type == '.reg_layer' ? 1:2 }, success: function(res) { if (res.status == 'success') { changeLayer('.account_login_layer') } else { layer.msg(res.msg); } } }); break case '.binding_layer': $.ajax({ type: "post", url: "/User/bindMobile", dataType: "json", data: { 'mobile': $(layer_type + ' input[name="mobile"]').val(), 'password': $(layer_type + ' input[name="password"]').val(), 'code': $(layer_type + ' input[name="code"]').val() }, success: function(res) { if (res.status == 'success') { var url = window.location.href.replace("user_before_login=1","user_before_login=0"); window.location.href = url; } else { layer.msg(res.msg); } } }); break } } else { // console.log('false') // layer.msg('请正确填写内容!') return } } function getUserTelCode(code) { // 获取验证码(注册,绑定需要验证手机唯一性) if (userWait != 60) { return false } var $mobile = $(layer_type + ' input[name="mobile"]').val(); var $img_code = $(layer_type + ' input[name="img_code"]').val(); if ($mobile == '') { $(layer_type + ' input[name="mobile"]').parent().find('.err').text('手机号不能为空!'); $(layer_type + ' input[name="mobile"]').addClass('input-err') return false; } if (!(/^[1][0-9]{10}$/.test($mobile))) { $(layer_type + ' input[name="mobile"]').parent().find('.err').text('手机号格式不正确!'); $(layer_type + ' input[name="mobile"]').addClass('input-err') return false; } if ($img_code == '') { $(layer_type + ' input[name="img_code"]').parent().find('.err').text('验证码不能为空!'); $(layer_type + ' input[name="img_code"]').addClass('input-err') return false; } if(layer_type == '.reg_layer' || layer_type == '.binding_layer') { $.ajax({ type: "post", url: "/User/checkMobileUnion", dataType: "json", async: false, data: { 'mobile': $mobile }, success: function(res) { if (res.status == 'success') { $.ajax({ type: "post", url: "/User/sendMess", dataType: "json", data: { 'mobile': $mobile, "img_code":$img_code }, success: function(res) { check_user_code = res; if (res == -1) { layer.msg("验证码错误!"); }else if (res == -2) { layer.msg("验证码不能为空!"); }else if (res == -3) { layer.msg("手机格式不正确!"); }else{ userCodeClk(code); } } }); } else { layer.msg(res.msg); } } }); } else { $.ajax({ type: "post", url: "/User/sendMess", dataType: "json", data: { 'mobile': $mobile, "img_code":$img_code }, success: function(res) { check_user_code = res; if (res == -1) { layer.msg("验证码错误!"); }else if (res == -2) { layer.msg("验证码不能为空!"); }else if (res == -3) { layer.msg("手机格式不正确!"); }else{ userCodeClk(code); } } }); // userCodeClk(code); } } function userCodeClk(code) { // 验证码倒计时 var $code = $(code); if (userWait == 0) { $code.removeClass('wait'); $code.html('获取验证码'); userWait = 60; } else { $code.html('已发送(' + userWait + ')'); $code.addClass('wait'); userWait--; time_out = setTimeout(function() { userCodeClk(code) }, 1000); } } $(layer_type).on('blur', 'input', function(){ // 验证 var that = $(this) if(that.val() == ''){ switch (that.attr('name')) { case 'mobile': that.parent().find('.err').text('手机号不能为空!'); break; case 'password': that.parent().find('.err').text('密码不能为空!'); break; case 'code': that.parent().find('.err').text('验证码不能为空!'); break; default: that.parent().find('.err').text('所有项为必填项!'); break; } that.addClass('input-err') }else{ that.parent().find('.err').text('') that.removeClass('input-err') } if(that.val() != '' && that.attr('name') == 'mobile'){ if (!(/^[1][0-9]{10}$/.test(that.val()))) { that.parent().find('.err').text('手机格式不正确!'); that.addClass('input-err') }else{ that.parent().find('.err').text(''); that.removeClass('input-err') } } if(that.val() != '' && that.attr('name') == 'password'){ if (that.val().length < 6) { that.parent().find('.err').text('密码长度至少需要6个字符'); that.addClass('input-err') }else if (that.val().length > 16){ that.parent().find('.err').text('密码长度不能超过16个字符'); that.addClass('input-err') } else { that.parent().find('.err').text(''); that.removeClass('input-err') } } });

Catalyst InvestorsVC/PE

投资:发展期,扩展期,早期

2000-01

投资公司: 9 家

投资事件: 16 起

进入一下轮: 3 家

联系我们 意见反馈

如需获取了解数据服务或需人工服务请微信扫描左侧二维码,联系注明“数据”。

企业
对接
联系
合作
在线
客服

扫码咨询在线客服

意见
反馈