<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link rel="stylesheet" href="${ctxwxsta}/css/public.css">
    <link rel="stylesheet" href="${ctxwxsta}/css/basic.css">
    <script src="${ctxwxsta}/js/flexible.js"></script>
    <script src="${ctxwxsta}/js/jquery-1.8.3.min.js"></script>
    <script src="/static/weixin/common/layer_mobile/layer.js"></script>
    <link rel="stylesheet" href="/static/weixin/common/layer_mobile/need/right.css">
    <script src="${ctxwxsta}/js/basicOne.js"></script>
    <title>手机端-登录</title>

</head>
<body>
<div class="contain">
    <div class="bai-head">
        <span>合作伙伴登录</span>
    </div>
    <div class="login-logo">
        <img src="${ctxwxsta}/images/login-logo.png" />
        <from  id="queryForm" action ="//webUser/login" mehtod="post">
        <div class="login-input">
            <div class="login-cont">
                <span>登录账号</span>
                <input type="text" name="login_name" value=""  id="login_name" placeholder="请填写账号" class="inp1">
                <span class="pwd">密码</span>
                <input type="password" placeholder="请填写密码" name="password" value="" class="inp2" id="password" onblur="passwordBlur()">

                <input  type="hidden" name="oppen_id" id="oppenId" value="${oppenId}">

                <input type="text" id="text"  style="display:none" onblur="textBlur()" class="inp3"/>
                <div class="pwd-yan" onclick="showHidePassword()">
                    <!--<img src="../static/images/login-yan.png"/>-->
                </div>
            </div>
            <p>
                <span class="login-error"  id="error_msg" style="display: none">
                    账号或密码不正确
                </span>
                <a href="javascript:;" onclick="forgotPwd()">忘记密码？</a>
            </p>
        </div>
        <div class="login-submmit">
            <a href="#" onclick="tijiao()" id="submmit">登录</a>
        </div>
        </from>
    </div>
</div>

<!--忘记密码弹窗-->
<div class="forgot-password" id="pwd">
    <div class="forgot-head">
        <img src="${ctxwxsta}/images/forgot-pwd.png" />
        <p>请联系客服，400-662-9696</p>
    </div>
    <div class="forgot-foot">
        <span onclick="closePwd()">我知道了</span>
    </div>
</div>

<!--黑色透明蒙版-->
<div class="balck-mask"></div>


<script>
    <%--$(function(){--%>
        <%--var oppenID= '${param.oppenId}';--%>
        <%--if($("#oppenId").val()==null||$("#oppenId").val()==""){--%>
            <%--if("undefined" != typeof oppenID){--%>
                <%--if(oppenID=="null"||oppenID==""){--%>
                    <%--oppenID="";--%>
                <%--}--%>
            <%--}--%>
            <%--$("#oppenId").val(oppenID);--%>
        <%--}--%>
    <%--});--%>

    function  tijiao(){

        var baseUrl = '${pageContext.request.contextPath }';
        var  password=$("#password").val();
        var login_name =$("#login_name").val();
        var  oppenId=$("#oppenId").val();
        if(login_name==''){
            layer.open({content:"账号名不能为空！",btn: '我知道了'});
           return ;
        }
        if(password==''){
            layer.open({content:"密码不能为空！",btn: '我知道了'});
            return ;
        }
        $.ajax({
            type: 'POST',
            url: baseUrl+"/weixin/webUser/login",
            data:{login_name:login_name,login_password:password,oppen_id:oppenId},
            dataType:"json",
            async: false,
            success: function(data){
                if(data.success){
                    location.href=baseUrl+"/weixin/primaryPage/listNew";
                }else{
                    $("#error_msg").html(""+data.msg);
                    $("#error_msg").show();
                }
            }
        });

    }
    function closePwd() {
        $(".forgot-password").hide();
        $(".balck-mask").hide();
    }




</script>


</body>
</html>