HEX
Server: Apache/2.4.6 (CentOS) PHP/5.6.39
System: Linux izj6c6ukj0hyugxsgmuxz3z 3.10.0-514.6.2.el7.x86_64 #1 SMP Thu Feb 23 03:04:39 UTC 2017 x86_64
User: root (0)
PHP: 5.6.39
Disabled: NONE
Upload Files
File: /web/data/www.tbbprovision.com/static/js/user.js
var userobj={
    login:function(){
        $('input[name=account]').focus();

        $('#defaultForm').bootstrapValidator({
            message: 'This value is not valid',
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                // invalid: 'glyphicon glyphicon-remove',
                // validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                email: {
                    message: '邮箱格式错误',
                    validators: {
                        notEmpty: {message: '邮箱不能为空'},
                        regexp: {
                            regexp: /[a-z0-9][a-z\.0-9-_]+@[a-z0-9_-]+(?:\.[a-z]{1,3}\.[a-z]{1,3}|\.[a-z]{1,3})/i,
                            message: '邮箱格式错误'
                        }
                    }
                },
                password: {
                    message: 'The username is not valid',
                    validators: {
                        notEmpty: {message: '密码不能为空'}
                    }
                },
                code: {
                    message: 'The username is not valid',
                    validators: {
                        notEmpty: {message: '验证码不能为空'}
                    }
                }
            }
        }).on('success.form.bv', function(e) {
            e.preventDefault();
            var $form = $(e.target);
            var bv = $form.data('bootstrapValidator');
            $.ajax({
                type:"POST",
                url:$('#defaultForm').attr('action'),
                // url:'http://www.google.com',
                data:$('#defaultForm').serialize(),
                dataType:"json",
                timeout : 10000,
                beforeSend: function(){$("#validateBtn").button('loading');},
                error: function(xhrData){
                    global.toastr('warning',xhrData.responseText);
                },
                success: function(xhrData){
                    global.toastr('success',xhrData.response_content);
                    /*setTimeout(function () {
                        window.location.reload();
                    },1000);*/
                },
                complete: function(xhrData){
                    $("#validateBtn").button('reset');
                }
            });
        });
    }
}