login.html 14.2 KB
<!DOCTYPE html>
<!-- saved from url=(0035)http://www.autopartschina.org/index -->
<html class="js no-touch no-android chrome no-firefox no-iemobile no-ie no-ie8 no-ie10 no-ie11 no-ios no-ios7 ipad cssanimations">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="shortcut icon" href="./../../assectimg/bitbug_favicon2.ico" type="image/x-icon">
    <link rel="bookmark" href="http://www.autopartschina.org/favicon.ico" type="image/x-icon">
    <title>{$login_title}</title>
    <meta name="description" content="{$login_title}">
    <meta name="keywords" content="{$login_title}">
    <meta http-equiv="Cache-Control" content="public">
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <link rel="stylesheet" href="//at.alicdn.com/t/font_938290_r8g8j9gp088.css">
    <link href="https://cdn.bootcss.com/animate.css/3.5.2/animate.min.css" rel="stylesheet">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/com.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/iconfont.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/index.min.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/content.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/login.css">

</head>
<body>
<div class="login_box">
    <div class="container">
        <div class="login_header">
            <div class="login_logo1">
                <img src="__TMPL__/public/assets/img/bpic02@2x.png" alt="">
            </div>
            <div class="header_txtbox">
                <div class="login_header_txt">天津国际工业装配及自动化展览会</div>
                <div>2019.3.6-9 天津·梅江会展中心</div>
            </div>
        </div>
        <div class="login_main">
            <div class="login_left">
                <img src="__TMPL__/public/assets/img/dengluzhuce_img01.png" alt="">
            </div>
            <div class="login_right login_reg" >
                <div class="login_nav">
                    <div class="login_navitem " id="dengluTitle">登录账号</div>
                    <div class="login_navitem" id="zhuceTitle">注册新账号</div>
                </div>
                <!--登陆-->
                <div class="site_login" style="display: none" id="dengluContent">
                    <div class="logininput_box">
                        <div class="input_icon">
                            <i class="iconfont icon-shouji"></i>
                        </div>
                        <div class="login_input">
                            <input type="tel" placeholder="手机号" id="mobile2" value="{$mobile}">
                        </div>
                    </div>
                    <div class="logininput_box">
                        <div class="input_icon">
                            <i class="iconfont icon-suo"></i>
                        </div>
                        <div class="login_input">
                            <input type="password" placeholder="密码" id="password2" value="{$password}">
                        </div>
                    </div>
                    <div class="logininput_box btn_sub" id="denglu">
                        立即登陆
                    </div>
                    <div class="login_info">
                        <div class="info_left">

                            <input type="checkbox" class="check_input" id="rememberCode" <eq name="$is_remember_password" value="1">checked</eq>  />记住密码</div>
                        <div class="info_rigth forget_a">忘记密码?</div>
                    </div>
                </div>
                <!--注册-->
                <div class="site_login" style="display: none" id="zhuceContent">
                    <div class="logininput_box">
                        <div class="input_icon">
                            <i class="iconfont icon-shouji"></i>
                        </div>
                        <div class="login_input">
                            <input type="tel" placeholder="手机号" id="mobile" value="">
                        </div>
                    </div>
                    <div class="logininput_box">
                        <div class="input_icon">
                            <i class="iconfont icon-suo"></i>
                        </div>
                        <div class="login_input ver_code">
                            <input type="text" placeholder="验证码" class="var_input" id="mobile_code">
                            <input  type="button" onclick="sendCode(this)" value="获取验证码" class="ver_codebtn" />
                        </div>
                    </div>
                    <div class="logininput_box">
                        <div class="input_icon">
                            <i class="iconfont icon-suo"></i>
                        </div>
                        <div class="login_input">
                            <input type="text" placeholder="密码" id="password">
                        </div>
                    </div>

                    <div class="logininput_box btn_sub" id="zhuce">
                        立即注册
                    </div>
                </div>
            </div>
            <!--修改密码-->
            <div class="login_right forget_pwd" style="display: none">
                <div class="login_nav pwd_title">
                    修改密码
                </div>
                <div class="forget  _login" >
                    <div class="logininput_box">
                        <div class="input_icon">
                            <i class="iconfont icon-shouji"></i>
                        </div>
                        <div class="login_input">
                            <input type="tel" placeholder="手机号" id="mobile3" >
                        </div>
                    </div>
                    <div class="logininput_box">
                        <div class="input_icon">
                            <i class="iconfont icon-suo"></i>
                        </div>
                        <div class="login_input ver_code">
                            <input type="text" placeholder="验证码" class="var_input" id="mobile_code3">
                            <input  type="button" onclick="sendCode2(this)" value="获取验证码" class="ver_codebtn" />
                        </div>
                    </div>
                    <div class="logininput_box pwd_inputbox">
                        <div class="input_icon">
                            <i class="iconfont icon-suo"></i>
                        </div>
                        <div class="login_input">
                            <input type="text" placeholder="新密码" id="password3">
                        </div>
                    </div>
                    <div class="pwd_info">
                        <div class="info_rigth go_login">返回</div>
                    </div>
                    <div class="logininput_box btn_sub  pwd_sub">
                        确定修改
                    </div>
                </div>
            </div>

        </div>
        <div class="botton_sub"><a href="#">关于我们</a>|<a href="">版权声明</a>|<a href="">网站地址</a>|<a href="#">全部新闻</a>|<a href="#">联系我们</a></div>
        <div class="bottom_main">{$site_info.site_icp}</div>

    </div>
</div>
<script src="__TMPL__/public/assets/js/jquery-3.2.1.min.js" type="text/javascript"></script>

<script src="__TMPL__/public/assets/js/c-chinaciai.js"></script>

<!--<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>-->
<script src="__TMPL__/public/assets/js/bootstrap3.3.7.min.js"></script>

<!--<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>-->
<script src="__TMPL__/public/assets/js/modernizr.js"></script>

<!--<script src="http://res.7csoft.com/cui/amazeui.ie8polyfill.min.js"></script>-->
<script src="__TMPL__/public/assets/js/amazeui.js"></script>

<!--<![endif]-->
<!--<script src="https://cdn.bootcss.com/wow/1.1.2/wow.min.js"></script>-->
<script src="__TMPL__/public/assets/js/wow.js"></script>
<script src="__TMPL__/public/assets/js/libs.min.js" type="text/javascript"></script>
<script src="__TMPL__/public/assets/js/common.js" type="text/javascript"></script>
<script src="__TMPL__/public/assets/js/index.min.js" type="text/javascript"></script>
<script>
    //判断页面类型
    var login_type = "{$login_type}";
    if(login_type == 1){
        //登录页面
        $('#dengluTitle').addClass('active');
        $('#zhuceTitle').removeClass('active');
        $('#zhuceContent').hide();
        $('#dengluContent').show();
    }else{
        $('#dengluTitle').removeClass('active');
        $('#zhuceTitle').addClass('active');
        $('#zhuceContent').show();
        $('#dengluContent').hide();
    }

    $('.login_navitem').click(function () {
        var index=$(this).index();
        console.log(index);
        $(this).addClass('active').siblings().removeClass('active');
        $('.site_login').hide();
        $('.site_login').eq(index).show();
    })

    //注册发送验证码
    function sendCode(val){
        var mobile = $('#mobile').val();
        $.ajax({
            type : 'POST',
            url : "{:url('common/sendMobileCode')}",
            data : {
                'mobile' : mobile
            },
            dataType : 'json',
            success :function(data){
                if(data.code == 1){
                    var countdown=60;
                    settime(val,countdown)
                }else{
                    alert(data.msg)
                }
            }
        })
    }
    //忘记密码发送验证码
    function sendCode2(val){
        var mobile = $('#mobile3').val();
        $.ajax({
            type : 'POST',
            url : "{:url('common/sendMobileCode')}",
            data : {
                'mobile' : mobile
            },
            dataType : 'json',
            success :function(data){
                if(data.code == 1){
                    var countdown=60;
                    settime(val,countdown)
                }else{
                    alert(data.msg)
                }
            }
        })
    }
    //倒计时
    function settime(val,countdown) {
        if (countdown == 0) {
            val.removeAttribute("disabled");
            val.value="获取验证码";
            countdown = 60;
        } else {
            val.setAttribute("disabled", true);
            val.value= countdown +"s";
            countdown--;
            setTimeout(function() {
                settime(val,countdown)
            },1000)
        }
    }
    $('.forget_a').click(function () {
        $('.login_reg').hide();
        $('.forget_pwd').show();
    })
    //    $('.pwd_sub').click(function () {
    //        $('.login_reg').show();
    //        $('.forget_pwd').hide();
    //    })
    $('.go_login').click(function () {
        $('.login_reg').show();
        $('.forget_pwd').hide();
    })
</script>
<script>
    //注册
    $('#zhuce').click(function () {
        var mobile = $('#mobile').val();
        var mobile_code = $('#mobile_code').val();
        var password = $('#password').val();
        $.ajax({
            type : 'POST',
            url : "{:url('login/ajax_register')}",
            data : {
                'mobile' : mobile,
                'mobile_code' : mobile_code,
                'password' : password
            },
            dataType : 'json',
            success :function(data){
                if(data.code == 1){
                    location.href = "{:url('login/login')}";
                }else{
                    alert(data.msg)
                }
            }
        })
    })

    //登录
    $('#denglu').click(function () {
        var mobile = $('#mobile2').val();
        var password = $('#password2').val();
        $.ajax({
            type : 'POST',
            url : "{:url('login/ajax_login')}",
            data : {
                'mobile' : mobile,
                'password' : password
            },
            dataType : 'json',
            success :function(data){
                if(data.code == 1){
                    location.href = "{:url('index/index')}";
                }else{
                    alert(data.msg)
                }
            }
        })
    })


    //记住密码
    $('#rememberCode').click(function () {
        var mobile = $('#mobile2').val();
        var password = $('#password2').val();
        var ischeck = $(this).is(':checked');
        if(ischeck){
            //记住密码
            $.ajax({
                type : 'POST',
                url : "{:url('login/ajax_remember_password')}",
                data : {
                    'mobile' : mobile,
                    'password' : password,
                    'ischeck' : ischeck,
                },
                dataType : 'json',
                success :function(data){
                    if(data.code != 1){
                        $('#rememberCode').attr('checked',null)
                        alert(data.msg)
                    }
                }
            })
        }else{
            //取消记住密码
            $.ajax({
                type : 'POST',
                url : "{:url('login/ajax_cencel_remember_password')}",
                data : {},
                dataType : 'json',
                success :function(data){
                    //成功
                }
            })
        }

    })

    //忘记密码
    $('.pwd_sub').click(function () {
        var mobile = $('#mobile3').val();
        var mobile_code = $('#mobile_code3').val();
        var password = $('#password3').val();
        $.ajax({
            type : 'POST',
            url : "{:url('login/ajax_reset_password')}",
            data : {
                'mobile' : mobile,
                'mobile_code' : mobile_code,
                'password' : password
            },
            dataType : 'json',
            success :function(data){
                if(data.code == 1){
                    location.href = "{:url('login/login')}";
                }else{
                    alert(data.msg)
                }
            }
        })
    })

</script>
</body>
</html>