<?php /* D:\phpstudy\PHPTutorial\WWW\liangshan\resources\views/Admin/login.blade.php */ ?>

<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
	<head>
	<meta charset="utf-8">
	<link rel="icon" type="image/x-icon" href="/titlelogo.png" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>凉山扶贫展销平台后台登录</title>
	<link rel="shortcut icon" href="favicon.ico">
	<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,300' rel='stylesheet' type='text/css'>
	<link rel="stylesheet" href="/homelogin/css/bootstrap.min.css">
	<link rel="stylesheet" href="/homelogin/css/animate.css">
	<link rel="stylesheet" href="/homelogin/css/style.css">
	<script src="/homelogin/js/modernizr-2.6.2.min.js"></script>
	</head>
	<body class="style-3">
		<div class="container">
			<div class="row">
				<div class="col-md-4 col-md-push-8">
					<form action="/admin/hehe/haha/dologin" method="post" class="fh5co-form animate-box" data-animate-effect="fadeInRight">
						<!-- <h2>简诺</h2> -->
						<img src="/jr-logo.png" style="width:100px;height:100px">
						<div class="form-group">
							<label for="username" class="sr-only">用户名</label>
							<input type="text" class="form-control" id="username" placeholder="用户名" autocomplete="off" name="username" value="">
						</div>
						<div class="form-group">
							<label for="password" class="sr-only">密码</label>
							<input type="password" class="form-control" id="password" placeholder="密码" autocomplete="off" name="password" value="">
						</div>
						<?php if(session('login_n')): ?>
							<?php echo Geetest::render('float'); ?>

						<?php endif; ?>
						<br>
						<div class="form-group">
							<p>忘记密码?　<a href="javascript:layer.alert('管理员不在!')">请联系超级管理员</a></p>
						</div>
						<?php echo e(csrf_field()); ?>

						<div class="form-group">
						<input type="submit" value="登录" class="btn btn-primary" onclick="return isok()">
						</div>
          </form>
				</div>
			</div>
			<div class="row" style="padding-top: 60px; clear: both;">
				<div class="col-md-12 text-center"><p><small>2019 &copy; All Rights Reserved. 凉山扶贫展销平台<br></small></p></div>
			</div>
		</div>
	
	<!-- jQuery -->
	<script src="/homelogin/js/jquery.min.js"></script>
	<!-- Bootstrap -->
	<script src="/homelogin/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="/homelogin/js/layer.js"></script>
	<!-- Placeholder -->
	<script src="/homelogin/js/jquery.placeholder.min.js"></script>
	<!-- Waypoints -->
	<script src="/homelogin/js/jquery.waypoints.min.js"></script>
	<!-- Main JS -->
	<script src="/homelogin/js/main.js"></script>
  </body>
  <script>
    function isok()
    {
      $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }
     });
      var username = $('#username').val();
      var password = $('#password').val();
      if(username.length && password.length){
        $.post('/admin/hehe/haha/dologin',{username:username,password:password,isone:'one'},function(data){
          if(data){
            return true;  //通过直接提交
          }
          return false;  //账号或密码为空
        })
      }else{
        layer.msg('账号或密码不能为空！');
        return false;
      }
    }
  </script>
      <?php if(session('err')): ?>
      <script>
        layer.msg('<?php echo e(session("err")); ?>');
      </script>
      <?php elseif(session('err2')): ?>
      <script>
        layer.msg('<?php echo e(session("err2")); ?>');
      </script>
			<?php elseif(session('err4')): ?>
			<script>
        layer.msg('<?php echo e(session("err4")); ?>');
			</script>
			<?php elseif(session('outlogin')): ?>
			<script>
        layer.msg('<?php echo e(session("outlogin")); ?>');
			</script>
			<?php endif; ?>
</html>

