<%@ page import="com.lightinit.hsdataportal.dictionary.DicUserAuthState" %>
<%@ page language="java" pageEncoding="UTF-8"
         contentType="text/html; charset=UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    String basePath = request.getContextPath();
    String resourcePath = basePath + "/resource";
%>
<!doctype html>
<html>
<head>
    <title>基本信息</title>
    <meta charset="utf-8">
    <jsp:include page="../common/head.jsp"></jsp:include>
</head>
<body>
<jsp:include page="../common/body_header.jsp"></jsp:include>
<jsp:include page="../common/user_center_header.jsp"></jsp:include>

    <div class="user-mid2">
    <div class="xinxi0">
        <div class="user-mid0">
            <div class="if">
                <span onclick="fnBaseInfoId()" id="baseInfoId" class="xx0" ><a>基本信息</a></span>
                <span onclick="fnVerifyId()" id="verifyId" class="xx"><a>实名认证</a></span>
                <span onclick="fnPasswordId()" id="passwordId" class="xx"><a>修改密码</a></span>
            </div>
            <div class="clearfix"></div>
            <div class="xx-main" id="fnBaseInfoIdView">
                <table>
                    <tr>
                        <td>账户名：</td>
                        <td>${outputModel.username}</td>
                    </tr>
                    <tr>
                        <td>实名认证：</td>
                        <td>${outputModel.authState}</td>
                    </tr>
                    <tr>
                        <td>APIkey：</td>
                        <td>${outputModel.authKey}</td>
                    </tr>
                    <tr>
                        <td>scretKey：</td>
                        <td style="width:800px;word-wrap : break-word ;word-break: break-all">${outputModel.authSecret}</td>
                    </tr>
                    <tr>
                        <td>手机号码：</td>
                        <td>${outputModel.authPhone}</td>
                    </tr>
                </table>
            </div>
            <div class="xx-main" id="fnVerifyIdView">
                <div class="rz-neirong">
                    <form action="">
                        <div class="form03">
                                        <span class="font">
                                            用户名
                                        </span>
                            <div class="form1">
                                <input type="text" class="input4" readonly="readonly" value="${outputModel.username}">
                            </div>
                        </div>
                        <div class="form03">
                                        <span class="font1">
                                            <span class="xinghao" >*</span>姓名
                                        </span>
                            <div class="form1">
                                <input type="text" class="input4" readonly="readonly" value="${outputModel.fullName}"/>
                            </div>
                        </div>
                        <div class="form03">
                                        <span class="font01">
                                            <span class="xinghao" >*</span>认证方式
                                        </span>
                            <div class="form13">
                                <input type="radio" value="身份证认证" disabled="disabled" name="renzheng" ${outputModel.authMethod =='身份证认证'?"checked='checked'":''}>身份证认证&nbsp;&nbsp;&nbsp;&nbsp;
                                <input type="radio" value="手机认证" disabled="disabled" name="renzheng" ${outputModel.authMethod =='手机认证'?"checked='checked'":''}>手机认证&nbsp;&nbsp;&nbsp;&nbsp;
                                <input type="radio" value="银行卡号认证" disabled="disabled" name="renzheng" ${outputModel.authMethod =='银行卡号认证'?"checked='checked'":''}>银行卡号认证
                            </div>
                        </div>
                        <c:if test="${outputModel.authMethod=='身份证认证'}">
                            <div class="form03">
                                        <span class="font01">
                                            <span class="xinghao" >*</span>身份证号码
                                        </span>
                                <div class="form1">
                                    <input type="text" class="input4" readonly="readonly" value="${outputModel.idCard}">
                                </div>
                            </div>
                        </c:if>
                        <c:if test="${outputModel.authMethod=='手机认证'}">
                            <div class="form03">
                                        <span class="font01">
                                            <span class="xinghao" >*</span>身份证号码
                                        </span>
                                <div class="form1">
                                    <input type="text" class="input4" readonly="readonly" value="${outputModel.idCard}">
                                </div>
                            </div>
                            <div class="form03">
                                        <span class="font01">
                                            <span class="xinghao" >*</span>手机号码
                                        </span>
                                <div class="form1">
                                    <input type="text" class="input4" readonly="readonly"  value="${outputModel.authPhone}">
                                </div>
                            </div>
                        </c:if>
                        <c:if test="${outputModel.authMethod=='银行卡号认证'}">
                            <div class="form03">
                                        <span class="font01">
                                            <span class="xinghao" >*</span>银行卡号
                                        </span>
                                <div class="form1">
                                    <input type="text" class="input4" readonly="readonly"  value="${outputModel.bankCard}">
                                </div>
                            </div>
                        </c:if>

                    </form>
                </div>
                <div  class="tishi2">${outputModel.authState ==DicUserAuthState.WAITING?'正在认证中。。。':'认证已通过'}</div>
            </div>
            <div class="xx-main" id="fnPasswordIdView">
                <div class="window1">
                    <div class="top01">
                        <span class="p00">&nbsp;</span>
                    </div>
                    <div class="form11">
                        <form action="<%=basePath%>/open/userverify/changePassword.action" method="post">
                            <div class="form0">
                                <span class="font">
                                    <span class="xinghao" >*</span>旧密码
                                </span>
                                <div class="form1">
                                    <input type="password" class="input4" name="oldpassword" placeholder="请输入旧密码">
                                </div>
                            </div>
                            <div class="form0">
                                <span class="font">
                                    <span class="xinghao" >*</span>新密码
                                </span>
                                <div class="form1">
                                    <input type="password" class="input4" name="newpassword" placeholder="请输入新密码">
                                </div>
                            </div>
                            <div class="form0">
                                <span class="font01">
                                    <span class="xinghao" >*</span>确认新密码
                                </span>
                                <div class="form1">
                                    <input type="password" class="input4" name="renewpassword" placeholder="请再次填写新密码">
                                </div>
                            </div>
                            <div class="form010">
                                注意：密码只能包含数字字母下划线中划线，8到20位
                            </div>
                            <input type="button" class="queren1" value="确认" onclick="fnSubimt()">
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<jsp:include page="../common/body_footer.jsp"></jsp:include>
</body>
<script type="text/javascript">

    //tab页切换
    /*if ($("#type").val() ==1){
        fnApplyData();
    }else{
        fnFollowData();
    }*/
    if(true){
        fnBaseInfoId();
    }
    function fnBaseInfoId(){
        $('#fnBaseInfoIdView').show();
        $('#fnVerifyIdView').hide();
        $('#fnPasswordIdView').hide();
        $("#baseInfoId").addClass("xx01");
        $("#verifyId").removeClass("xx01");
        $("#passwordId").removeClass("xx01");
    }
    function fnVerifyId(){
        $('#fnBaseInfoIdView').hide();
        $('#fnVerifyIdView').show();
        $('#fnPasswordIdView').hide();
        $("#baseInfoId").removeClass("xx01");
        $("#verifyId").addClass("xx01");
        $("#passwordId").removeClass("xx01");
    }

    function fnPasswordId(){
        $('#fnBaseInfoIdView').hide();
        $('#fnVerifyIdView').hide();
        $('#fnPasswordIdView').show();
        $("#baseInfoId").removeClass("xx01");
        $("#verifyId").removeClass("xx01");
        $("#passwordId").addClass("xx01");
    }

    //修改密码
    function fnSubimt(){
        $.get("<%=basePath%>/open/userverify/changePassword.action",$('#changePasswordId').serialize(),function(result){
            if(result.stateCode==200){
                alert(result.msg);
                $("#changePasswordId input[type='password']").val("");
            }else{
                alert(result.msg);
                $("#changePasswordId input[type='password']").val("");
            }
        })
    }
    //显示反馈页面
    /*function showDiv(tr){
        $('#area11').text($(tr).parent().children('input:eq(0)').val());
        var option=$(tr).parent().children('input:eq(1)').val()
        $('#area22').text(option==''?'无':option);
        $('#area33').text($(tr).parent().children('input:eq(2)').val());
        $('#feekbackId').show();
    }
    //关闭
    function closeDivApply(){
        $('#feekbackId').hide();
    }*/
</script>
</html>
