{% load staticfiles %}
<!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">
    <title>登录界面</title>
    <link rel="stylesheet" href="{% static '/lib/css/swiper.min.css' %}">
    <link rel="stylesheet" href="{% static '/lib/font/fontIcon/iconfont.css' %}">
    <link rel="stylesheet" href="{% static '/lib/font-awesome/4.5.0/css/font-awesome.css' %}">
    <!-- <link rel="stylesheet" href="{% static '/lib/css/video-js.min.css' %}"> -->
    <link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css">
    <link rel="stylesheet" href="{% static '/lib/css/reset.css' %}">
    <link rel="stylesheet" href="{% static '/css/common.css' %}">
    <link rel="stylesheet" href="{% static '/css/header.css' %}">
    <link rel="stylesheet" href="{% static '/css/login.css' %}">
</head>

<body>
    <div class="header">
        <div class="headerTop wrapper">
            <!-- <div class="wrapper">
                <a href="home" style="float: right;color: #fff;">切换首页</a>
                <p class="logoNameCn">休闲农业旅游网</p>
                <p class="logoNameEn">Leisure agricultural tourism network</p>
            </div> -->
            <div class="logoTxt">
                <a href="">
                   <h1>休闲农业旅游网</h1>
                    <p>www.XXNYLY.CN</p> 
                </a>
            </div>
            <div class="LocateCover">
                <div class="currCity">
                    <div class="maskLine"></div>
                    <i class="fa fa-map-marker" aria-hidden="true"></i>
                    <span>全国</span>
                    <i class="fa fa-chevron-down" aria-hidden="true"></i>
                    <div class="selectCityCover">
                        <div class="hot_address">
                            <a href="javascript:void();" onclick="city_change(this,25,'bj')">北京</a>
                            <a href="javascript:void();" onclick="city_change(this,347,'sh')">上海</a>
                            <a href="javascript:void();" onclick="city_change(this,375,'tj')">天津</a>
                            <a href="javascript:void();" onclick="city_change(this,355,'xa')">西安</a>
                            <a href="javascript:void();" onclick="city_change(this,338,'nj')">南京</a>
                            <a href="javascript:void();" onclick="city_change(this,389,'wh')">武汉</a>
                            <a href="javascript:void();" onclick="city_change(this,260,'hz')">杭州</a>
                        </div>
                        <div class="hot_address_er">
                            <div class="left">华北：</div>
                            <div class="right">
                                <a href="javascript:void();" onclick="city_change(this,25,'bj')">北京</a>
                                <a href="javascript:void();" onclick="city_change(this,375,'tj')">天津</a>
                                <a href="javascript:void();" onclick="city_change(this,356,'sjz')">石家庄</a>
                                <a href="javascript:void();" onclick="city_change(this,377,'ts')">唐山</a>
                                <a href="javascript:void();" onclick="city_change(this,365,'qd')">青岛</a>
                                <a href="javascript:void();" onclick="city_change(this,371,'jn')">济南</a>
                                <a href="javascript:void();" onclick="city_change(this,379,'ty')">太原</a>
                                <a href="javascript:void();" onclick="city_change(this,5423,'lf')">廊坊</a>
                                <a href="javascript:void();" onclick="city_change(this,5738,'wlcb')">乌兰察布</a>
                            </div>
                        </div>
                        <div class="hot_address_er">
                            <div class="left">东北：</div>
                            <div class="right">
                                <a href="javascript:void();" onclick="city_change(this,351,'sy')">沈阳</a>
                                <a href="javascript:void();" onclick="city_change(this,235,'dl')">大连</a>
                                <a href="javascript:void();" onclick="city_change(this,218,'cc')">长春</a>
                                <a href="javascript:void();" onclick="city_change(this,268,'heb')">哈尔滨</a>
                                <a href="javascript:void();" onclick="city_change(this,5689,'hlbe')">呼伦贝尔</a>
                            </div>
                        </div>
                        <div class="hot_address_er">
                            <div class="left">华东：</div>
                            <div class="right">
                                <a href="javascript:void();" onclick="city_change(this,347,'sh')">上海</a>
                                <a href="javascript:void();" onclick="city_change(this,338,'nj')">南京</a>
                                <a href="javascript:void();" onclick="city_change(this,363,'sz')">苏州</a>
                                <a href="javascript:void();" onclick="city_change(this,260,'hz')">杭州</a>
                                <a href="javascript:void();" onclick="city_change(this,336,'nb')">宁波</a>
                                <a href="javascript:void();" onclick="city_change(this,391,'wx')">无锡</a>
                                <a href="javascript:void();" onclick="city_change(this,298,'nc')">南昌</a>
                                <a href="javascript:void();" onclick="city_change(this,900,'hf')">合肥</a>
                                <a href="javascript:void();" onclick="city_change(this,229,'cz')">常州</a>
                            </div>
                        </div>
                        <div class="hot_address_er">
                            <div class="left">华中：</div>
                            <div class="right">
                                <a href="javascript:void();" onclick="city_change(this,217,'zz')">郑州</a>
                                <a href="javascript:void();" onclick="city_change(this,226,'cs')">长沙</a>
                                <a href="javascript:void();" onclick="city_change(this,389,'wh')">武汉</a>
                            </div>
                        </div>
                        <div class="hot_address_er">
                            <div class="left">华南：</div>
                            <div class="right">
                                <a href="javascript:void();" onclick="city_change(this,399,'xm')">厦门</a>
                                <a href="javascript:void();" onclick="city_change(this,254,'hk')">海口</a>
                                <a href="javascript:void();" onclick="city_change(this,305,'gy')">贵阳</a>
                                <a href="javascript:void();" onclick="city_change(this,7047,'qs')">宿迁市</a>
                                <a href="javascript:void();" onclick="city_change(this,340,'nn')">南宁</a>
                                <a href="javascript:void();" onclick="city_change(this,314,'lj')">丽江</a>
                                <a href="javascript:void();" onclick="city_change(this,5548,'bs')">保山</a>
                                <a href="javascript:void();" onclick="city_change(this,5517,'qf')">曲阜</a>
                                <a href="javascript:void();" onclick="city_change(this,286,'jj')">九江</a>
                                <a href="javascript:void();" onclick="city_change(this,207,'as')">安顺</a>
                            </div>
                        </div>
                        <div class="hot_address_er">
                            <div class="left">西南：</div>
                            <div class="right">
                                <a href="javascript:void();" onclick="city_change(this,227,'cd')">成都</a>
                                <a href="javascript:void();" onclick="city_change(this,223,'cq')">重庆</a>
                            </div>
                        </div>
                        <div class="hot_address_er">
                            <div class="left">西北：</div>
                            <div class="right">
                                <a href="javascript:void();" onclick="city_change(this,355,'xa')">西安</a>
                                <a href="javascript:void();" onclick="city_change(this,5578,'xn')">西宁</a>
                                <a href="javascript:void();" onclick="city_change(this,5537,'yl')">伊犁</a>
                                <a href="javascript:void();" onclick="city_change(this,312,'lz')">兰州</a>
                                <a href="javascript:void();" onclick="city_change(this,296,'ks')">喀什</a>
                                <a href="javascript:void();" onclick="city_change(this,237,'dh')">敦煌</a>
                                <a href="javascript:void();" onclick="city_change(this,278,'yc')">银川</a>
                                <a href="javascript:void();" onclick="city_change(this,5487,'yb')">延边</a>
                                <a href="javascript:void();" onclick="city_change(this,5581,'zws')">宁夏回族自治区中卫市</a>
                                <a href="javascript:void();" onclick="city_change(this,380,'wlmq')">乌鲁木齐</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="searchCover">
                <div class="searchBoxBj">
                    <input type="text" placeholder="请输入农庄名称">
                    <button>搜索</button>
                </div>
            </div>
            <!-- <div class="not_loginCover">
                <a href="login2" target="_blank">登录</a>
                <a href="" target="_blank">注册</a>
            </div> -->
            <div class="yet_loginCover">
               <div class="person">
                   <div class="userHeadImg">
                       <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
                   </div>
                   <div class="userCtrl">
                       <div class="userCtrlTop">
                           <div class="userInfo">
                               <div>
                                   <span>admin</span>
                               </div>
                           </div>
                       </div>
                       <div class="userCtrlBtm"><a href="back_manage" target="_blank">进入后台管理</a></div>
                    </div>
                    <div class="exit">
                        <a href="">
                            <i class="fa fa-power-off" aria-hidden="true"></i>
                        </a>
                    </div>
               </div>
            </div>
        </div>
        <!-- 登录内容 -->
    </div>
    <!-- 主体部分 -->
    <div class="content">
        <!-- 登录框 -->
        <div class="loginBj">
            <div class="borderline">
                <div class="loginBox">
                    <div class="title">用户登录</div>
                    <div class="loginInp">
                        <input type="text" id="username" placeholder="用户名">
                    </div>
                    <div class="loginInp">
                        <input type="password" id="password" placeholder="密码">
                        <a href="">忘记密码？</a>
                    </div>
                    <div class="loginBtnCover">
                        <button id="loginBtn" onclick="login()">登 录</button>
                    </div>
                    <div class="remPswCover">
                        <div class="remPwdInpBox">
                            <input type="checkbox" id="remPwdFlag">
                            <div></div>
                        </div>
                        <label for="remPwdFlag">记住密码</label>
                    </div>
                </div>
            </div>
        </div>
        <div class="wrapper">
            <!-- 合作伙伴 -->
            <div class="partnerCover">
                <div class="title">
                    <i class="fa fa-handshake-o" aria-hidden="true"></i>
                    <span>合作伙伴 </span>
                </div>
                <div class="partnerInner">
                    <ul class="partnerInnerList">
                        <li class="partnerInnerItem">
                            <a href="">
                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
                            </a>
                        </li>
                        <li class="partnerInnerItem">
                            <a href="">
                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
                            </a>
                        </li>
                        <li class="partnerInnerItem">
                            <a href="">
                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
                            </a>
                        </li>
                        <li class="partnerInnerItem">
                            <a href="">
                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
                            </a>
                        </li>
                        <li class="partnerInnerItem">
                            <a href="">
                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
                            </a>
                        </li>
                        <li class="partnerInnerItem">
                            <a href="">
                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
                            </a>
                        </li>
                        <li class="partnerInnerItem">
                            <a href="">
                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
                            </a>
                        </li>
                        <li class="partnerInnerItem">
                            <a href="">
                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
                            </a>
                        </li>
                        <li class="partnerInnerItem">
                            <a href="">
                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
                            </a>
                        </li>
                        <li class="partnerInnerItem">
                            <a href="">
                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
                            </a>
                        </li>
                        <li class="partnerInnerItem">
                            <a href="">
                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
                            </a>
                        </li>
                        <li class="partnerInnerItem">
                            <a href="">
                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
                            </a>
                        </li>
                        <li class="partnerInnerItem">
                            <a href="">
                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
                            </a>
                        </li>
                        <li style="clear: both;"></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!-- 底部版权 -->
    <div class="footer bjColor">
        <div class="wrapper">
            <div class="floatDiv">
                <div class="copyrightTxt">
                    <div>休闲农业旅游网</div>
                    <div>联系人：李四　　联系电话：13811111111</div>
                    <div>地址：河南省郑州市XXXXXXXXXXXXXXXXXXXXXXXXXX</div>
                </div>
                <div class="WeChatCode">
                    <img src="{% static '/imgs/WeChatCode.jpg' %}" alt="">
                    <p>关注公众号</p>
                </div>
            </div>
            <div class="copyright">
                版权所有XXXXXXXXXXXXXXXXXXXXXX
            </div>
        </div>
    </div>
    <!-- 返回顶部 -->
    <div id="back2top" class="back2top" style="display: block;">
        <a href="javascript:void(0);" onclick="goUp()" title="返回顶部">&nbsp;</a>
    </div>

    <script src="{% static '/lib/js/jquery-2.1.4.min.js'%}"></script>
    <script
        src="https://webapi.amap.com/maps?v=1.4.15&key=3939967b919a8003377dd113fc445a3d&plugin=AMap.Driving"></script>
    <!-- <script src="{% static '/lib/layui/layui.js'%}"></script> -->
    <!-- <script src="{% static '/js/index2.js'%}"></script> -->
    <script>

        // 登录
        function login() {
            var username = $("#username").val();
            var password = $("#password").val();
            if (!username) {
                $("#username").focus();
                return;
            }
            if (!password) {
                $("#password").focus();
                return;
            }

            // $('.notLogin').toggle();
            // $('.isLogin').toggle();
            // window.open("back_manage");

            $.ajax({
                url: 'user_land',
                data: {
                    username: username,
                    password: password
                },
                type: 'post',
                dataType: 'json',
                success: function (data) {
                    if (data.code == 1) {
                        // var hrefstr = 'person_farm?name=' + data.username;
                        window.location = 'home2'
                        window.open('back_manage')
                        // $('.isLogin').toggle();
                        // $('#person_farm').attr('href', hrefstr)
                        // $('.userPhoto').attr('src', data.user_img)
                        // $('.notLogin').hide();
                        // $('.isLogin').show();
                    } else if (data == 0) {
                        $('body').append('<div class="hint">用户不存在</div>')
                        setTimeout(function () {
                            $('.hint').remove();
                        }, 1000)
                    } else if (data == 2) {
                        $('body').append('<div class="hint">用户名错误</div>')
                        setTimeout(function () {
                            $('.hint').remove();
                        }, 1000)
                    } else if (data == 3) {
                        $('body').append('<div class="hint">密码错误</div>')
                        setTimeout(function () {
                            $('.hint').remove();
                        }, 1000)
                    } else {
                        $('body').append('<div class="hint">登录失败</div>')
                        setTimeout(function () {
                            $('.hint').remove();
                        }, 1000)
                    }
                },
                error: function (type) {

                }
            })
        }
    </script>
</body>

</html>