login.html 3.1 KB
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{$title|default=""}</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
    <link rel="stylesheet" type="text/css" href="__CDN__/assets/adverh5/css/login.css">
    <link rel="stylesheet" type="text/css" href="__CDN__/assets/adverh5/css/public.css">
    <script src="__CDN__/assets/adverh5/js/base.js"></script>
</head>
<style>
    .container{
        width: 100%;
        height: 100%;
        background: url('__CDN__/assets/adverh5/img/bg2.png') no-repeat center;
        background-size: 100% 100%;
        background-attachment: fixed;
        overflow: hidden;
    }
    .login_btn{
        width: 5.9rem;
        height: 1.12rem;
        background: url('__CDN__/assets/adverh5/img/9.png') no-repeat;
        background-size: 100% 100%;
        overflow: hidden;

        font-size:0.32rem;
        font-family:PingFang SC;
        font-weight:bold;
        color:rgba(249,249,249,1);
        opacity:1;
        text-align: center;
        line-height: 1.12rem;
        margin:0.88rem auto 0;
    }
</style>
<body>
<div class="toast">与服务器断开连接</div>
<div class="container">
    <div class="title">
        页面标题页面标题
    </div>
    <div class="password">
        <div class="lock">
            <img src="__CDN__/assets/adverh5/img/10.png"/>
        </div>
        <div class="input">
            <input id="password" type="password" placeholder="请输入密码"/>
        </div>
    </div>
    <div class="login_btn">
        登录
    </div>
</div>
<script src="__CDN__/assets/adverh5/js/jquery.min.js"></script>
<script src="__CDN__/assets/adverh5/js/public.js"></script>
<script>
    $('.input input').on("blur", function () {
        window.scroll(0, 0);
    });
    //滑动隐藏键盘
    $('.container').on('touchstart',function(){
        $('textarea').blur()
        $('.more').hide();
    });
</script>
<script>
    $(function(){
        $('.login_btn').click(function(){
            var password = $('#password').val();
            if(password == ''){
                toast('请输入密码');
                return ;
            }
            $('.login_btn').text('登录中...');
            $.ajax({
                url:"{:url('home/index/login_verify')}",
                type:"POST",
                data:{"password":password},
                success:function(res){
                    if(res.code == 1){
                        toast('登陆成功');
                        setTimeout(function(){
                            window.location.href = "{:url('home/index/index','',false,true)}/goods_id/"+res.data.id;
                        },2500);
                    }else{
                        toast(res.msg);
                        $('.login_btn').text('登录');
                    }
                },
                error:function(res){
                    toast('与服务器断开连接')
                    $('.login_btn').text('登录');
                }
            });
        });
    })
</script>
</body>
</html>