login.html 3.4 KB
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="/static/css/base.css">
    <link rel="stylesheet" href="/static/css/index.css">
    <script src="/static/js/base.js"></script>
    <script src="/statis/js/jquery.js"></script>
    <script src="/statis/js/include.js"></script>
    <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
    <title>登陆</title>
</head>

<body>
    <div class="Box">
        <div class="login_bg">

            <!-- logo -->
            <div class="login_logo">
                <img src="/static/image/logo_img.png" alt="">
            </div>
            <!-- 用户登陆 -->
            <div class="login_con">
                <h1 class="login_conTit">用户登录</h1>
                <form class="login_Box" id="formLog">
                    <div class="login_Li">
                        <div class="login_LiImg"><img src="/static/image/icon8.png" alt=""></div>
                        <input type="hidden" name="location" id="location2"/>
                        <input id="login_name" type="text" placeholder="请输入用户名" name="tel">
                    </div>
                    <div class="login_Li">
                        <div class="login_LiImg"><img src="/static/image/icon8.png" alt=""></div>
                        <input id="login_password"  type="text" placeholder="请输入密码" name="user_password">
                    </div>

                </form>
                <button class="login_btn">登录</button>
                <div class="login_span">
                    <span><a href="/api/login/password">找回密码</a></span>|<span><a href="/api/login/register">立即注册</a></span>
                </div>
                <div class="login_or">OR</div>

                <!-- 第三方 -->
                <div class="login_there">
                    <div class="login_thereTxt">第三方登录</div>
                    <div class="login_thereBox">
                        <div class="login_thereImg"><img src="/static/image/weixin_icon.png" alt=""></div>
                        <div class="login_thereImg"><img src="/static/image/qq_icon.png" alt=""></div>
                    </div>

                </div>
            </div>
        </div>
        <!-- footer -->
        <div class="footer">
            <div class="footer_Box2">
                <p>版权所有:<span>中关村国联绿色产业服务创新联盟</span></p>
                <p>北京市大兴区同济中路甲7号院</p>
                <p>京ICP备05052419号</p>
            </div>
            <div class="footer_Box3"></div>
        </div>
    </div>
</body>
<script>
    $("#location2").val(returnCitySN["cname"]);
    $(".login_btn").on("click",function () {
        var data=$("#formLog").serialize();
        if($('#login_name').val() == ""){
            w('请输入用户名');
        }else if($('#login_password').val() == ""){
            w('请输入密码');
        }else{
            ajax("/index/login/login",data,"post",function (res) {
                w(res.msg);
                if(res.code==200){
                    setTimeout(function () {
                        location.href="/api/index/index";
                    },500)
                }
            },"false");
        }
    })
</script>
</html>