




<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>登录 | 惠宇茶业-阿香美战略合作伙伴(顶级代理商)、正品保障、优质配送、网购首选</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
      content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp"/>
<meta name="keywords" content="茶业,茶叶,惠宇茶业,惠州茶业,黑茶,安化黑茶,阿香美黑茶,礼节茶,收藏茶,茶具,茶文化,茶动态,茶社,茶小吃,茶商城"/>
<meta name="description" content="惠州市惠宇茶业有限公司,是中华好茶品牌阿香美的战略合作伙伴,代理阿香美最具礼品价值和收藏价值的中高端礼节茶产品,精品套装茶用具,茶文化服务,茶业动态,特色茶食及茶社休闲享受!在线商城接受在线定购,支持商务定制,提供最优质物流和售后服务!"/>
<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="alternate icon" type="image/png" href="images/favicon.ico">
<link rel="stylesheet" href="assets/css/amazeui.css"/>
<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="assets/js/jquery.min.js"></script>
<!--<![endif]-->
<script src="assets/js/amazeui.min.js"></script>
<style type="text/css">
	form label {
		font-weight: normal;
	}
	#verifyimg {
		height:32px;
	}
</style>
</head>
<body>
<!-- 头部信息 -->
<header class="am-u am-topbar-fixed-top" style='line-height:35px;background:#fafafa; border-bottom:1px solid #f6f6f6f'>
  <div class="am-container">
  	<h2 class="am-u-lg-9 am-u-md-9 am-u-sm-9 am-show-sm-only am-text-lg" style='line-height:30px;height:30px;padding:5px 0 0 25px;'>
  		<a href="index.jsp" class="am-text-warning">惠宇茶业</a>
  	</h2>
    <p class="am-topbar-btn am-topbar-toggle am-btn am-btn-warning am-btn-sm am-show-sm-only am-margin-xs"
            data-am-collapse="{target: '#collapse-head'}">
       <span class="am-sr-only">导航切换</span>
       <span class="am-icon-bars"></span>
   </p>
    <div class="am-collapse am-topbar-collapse" id="collapse-head">
      <div class="am-topbar-right">
        <a href="user/cart" class="am-text-xs am-hide-sm am-margin-right-xs">我的购物车</a>
      	<a href="user/cart" class="am-btn am-btn-danger am-btn-sm am-show-sm-only">我的购物车</a>
      </div>
       
      
	       <div class="am-topbar-right">
	      	<a href="register.jsp" class="am-fl am-text-xs am-hide-sm am-margin-right-xs">免费注册</a>
	      	<a href="register.jsp" class="am-btn am-btn-warning am-btn-sm am-show-sm-only">注册</a>
	      </div>  
        
    </div>
  </div>
</header>
<!-- 头部信息 -->
<div class="header am-hide-sm">
  <div class="am-g am-u-lg-6 am-u-md-8 am-u-sm-centered"  style='text-align: center;'>
    <h1><a href="index.jsp" class="am-text-danger am-margin-top-sm">惠宇茶业  - 登录</a></h1>
    <p class="am-text-warning am-hide-sm">welcome home | 欢迎您回来</p>
  </div>
  <hr />
</div>
<div class="am-g am-margin-bottom-sm am-margin-top-sm" style="min-height:300px">
  <div class="am-u-md-6 am-u-sm-12 am-hide-sm">
  	<a href="index.jsp">
  	<img src="images/xiangyingshi.jpg" class="am-img-responsive" alt="惠宇茶业网站商城上线"/></a>
  </div>
  <div class="am-u-md-6 am-u-sm-12">
    <form class="am-form">
      <div class="am-margin-top-lg"> 会员登录  </div>      
      <div class="am-g am-margin-top-sm">
      	<label for="userName" class="am-u-sm-2 am-show-lg am-text-right">用户</label>
        <div class="am-u-sm-12 am-u-md-10 am-u-lg-8">
          <input type="text"  class="am-text-sm am-input-sm" name="" placeholder="手机/邮箱" id="userName" autocomplete="off" autofocus="autofocus" value="">
        </div>
        <div class="am-u-md-2"></div>
      </div>    
      <div class="am-g am-margin-top-sm">
      	<label for="password" class="am-u-sm-2 am-show-lg am-text-right">密码</label>
        <div class="am-u-sm-12 am-u-md-10 am-u-lg-8">
          <input type="password"  class="am-text-sm am-input-sm" name="" placeholder="密码"  autocomplete="off"  id="password" value="">
        </div>
        <div class="am-u-md-2"></div>
      </div>  
      
      <div class="am-g am-margin-top-sm">
			<label for="verify" class="am-u-sm-2 am-show-lg am-text-right"> 验证码</label>
	        <div class="am-u-sm-12 am-u-md-6 am-u-end" id="yz-verifyDiv">
				<div class="am-input-group">
					<input type="text" class="am-form-field" autocomplete="off" placeholder="验证码" required id="verify" style='height:33px;font-size:90%'> 
					<span class="am-input-group-btn" style='width:100px;'>
						<img alt="正在获取验证码" class="am-img-thumbnail" id="verifyimg" src="images/loading.gif" width='100%' height='33px' title="获取验证码" style='height:33px'>
					</span>
				</div>
	      </div>
      </div>      
           
		<!-- 
      <div class="am-g am-margin-top-sm">
      	<div class="am-u-sm-2 am-u-md-2 am-show-lg"></div>
      	<div class="am-u-sm-12 am-u-lg-10">
		    <label class="am-checkbox am-margin-0 am-u-sm-3" for="isKeep"  style='line-height:20px;cursor:pointer'>
		      <input type="checkbox" value="" id="isKeep" data-am-ucheck> 自动登录
		    </label>
	    </div>
      </div>  
       -->
      <div class="am-g am-margin-top">
     	 <div class="am-u-sm-2 am-show-lg"></div>
     	 <div class="am-u-sm-12 am-u-lg-10">
     	 	<button type="button" class="am-btn am-btn-primary am-btn-sm am-fl am-margin-right-sm btn-loading-example"  id="loginBtn" onClick="login(this);"> 登 录</button>
         	<a href="forgetPwd.jsp" class="am-btn am-btn-sm am-btn-default"> 忘记密码?</a>
    	</div>
      </div>
    </form>
  </div>
</div>
<br>

<div id="box"></div>

<!-- 脚部信息 -->

<style>
<!--
.am-footer-divider {
	font-weight: normal;
}
-->
</style>
<!-- 回到顶部 -->
<div data-am-widget="gotop" class="am-gotop am-gotop-fixed" >
  <a href="#top" title="回到顶部">
      <span class="am-gotop-title am-btn am-btn-primary">回到顶部</span>
        <i class="am-gotop-icon am-icon-chevron-up"></i>
  </a>
</div>

<!-- 脚部导航 -->
<footer data-am-widget="footer" class="am-footer am-footer-default" style="background:#f2f2f2">
    <div class="am-footer-switch">
	    <a href="javascript:void(0);" class="am-text-sm"> 郑重声明</a>
	    <span class="am-footer-divider"> | </span>
	    <a href="javascript:void(0);" class="am-text-sm"> 服务政策</a>
	   	<span class="am-footer-divider"> | </span>
	    <a href="javascript:void(0);" class="am-text-sm"> 企业订制</a>
	    <span class="am-footer-divider"> | </span>
	    <a href="help/center" class="am-text-sm"> 帮助中心</a>	    
	    <span class="am-footer-divider"> | </span>
	    <a href="suggestion" class="am-text-sm"> 意见反馈</a>
    </div>
    <div class="am-footer-miscs">
        <p>CopyRight © 2016  惠宇茶业  hychaye.com </p>
        <p>社会信任代码 : 91441303MA4ULMD41B</p>    
        <p><a href="https://beian.miit.gov.cn" target="_blank">粤ICP备16015650号-1</a></p>    
    </div>
    <div class="am-footer-miscs ">
    	<p><a href="javascript:;" title="" target="_blank" class="">Zeke </a> 提供全站技术支持</p>
    </div>    
</footer>

<script type="text/javascript" src="assets/js/yz.utils.js"></script>
<script type="text/javascript">
	/* 处理登录验证码 */
	$(function(){
		changeCode();
	});
	$("#verifyimg").click(function () {//生成验证码  
		changeCode(); 
	});		
	function changeCode() {  
	    $("#verifyimg").hide().attr("src",  getRootPath()+ "kaptcha/get.jxp?" + Math.floor(Math.random()*100) ).fadeIn();  
	    event.cancelBubble=true;  
	} 
	
	$(document).keyup(function(event){
		  if(event.keyCode ==13){
			  login($("#loginBtn"));
		  }
	});
	
	
	/* 登录请求 */
	function login(t){
		var userName = yzGetById("userName");
		if(isEmpty(userName)){
			amAlert({text:"请输入用户名！"});
			return;
		};
		if(isEmpty(yzGetById("password"))){
			amAlert({text:"请输入登录密码！",closeAction:5});
			return;
		};	
		var vcode = yzGetById("verify");
		if(isEmpty(vcode)){
			amAlert({text:"请输入验证码！"});
			return;
		};	
		
		$.ajax({
			url : getRootPath()+"login",
			type : "POST",
			data : {
				userName : userName,
				pwd : yzGetById("password"),
				verify : vcode,
				isKeep : $("#isKeep").is(":checked")
			},
			beforeSend:function(){
				amLoading({text:"正在提交请求..."});
			},
			success:function(response){
				amRemoveLoading(); //清除loading
				var refUrl = document.referrer;
				if(isEmpty(refUrl) || refUrl.indexOf("login") > -1
						|| refUrl.indexOf("register") > -1
						|| refUrl.indexOf("active") > -1
						|| refUrl.indexOf("forgetPwd") > -1
					){
					refUrl = getRootPath()+"index.jsp";
				}
				
				if(response.success){
					amAlert({text:response.result.msg,closeAction:1,callback:function(){
						window.location.href = refUrl ? refUrl : getRootPath()+"login.jsp";
					}});
				}else{
					amAlert({text:response.result.msg,closeAction:3});
				}				
			}
		});
	}
</script>
</body>
</html>