<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
    <head>
        <th:block th:include="include :: header('待审核')"/>
        <th:block th:include="include :: bootstrap-fileinput-css" />
    </head>

    <body class="white-bg">
        <div class="detail_status">用户状态：<span></span></div>
        <p class="detail_title">基础资料</p>
        <p>照片</p>
        <div class="detail_inner detail_img"><img src=""></div>
        <p>真实姓名</p>
        <div class="detail_inner detail_name"></div>
        <p>出生日期</p>
        <div class="detail_inner detail_time"></div>
        <p>性别</p>
        <div class="detail_inner detail_sex"></div>
        <p>所在城市</p>
        <div class="detail_inner detail_city"></div>
        <p>你的身份</p>
        <div class="detail_inner detail_id"></div>
        <p>学校全称/单位名称</p>
        <div class="detail_inner detail_school"></div>
        <p>所学专业/所在部门</p>
        <div class="detail_inner detail_acc"></div>
        <p>微信号</p>
        <div class="detail_inner detail_wx"></div>
        <p class="detail_title">认证信息</p>
        <p>姓名：</p>
        <div class="detail_inner detail_name"></div>
        <p>身份证号：</p>
        <div class="detail_inner detail_idcode"></div>
        <p class="detail_title">自我介绍</p>
        <div class="detail_inner detail_desc"></div>
        <p>手机号：</p>
        <div class="detail_inner detail_mobail"></div>
        <p>提交时间：</p>
        <div class="detail_inner detail_created"></div>
        <div class="bottomBtn">
            <a href="javascript:;" class="layui-layer-btn0" onclick="yes(1)">通过</a>
            <a class="layui-layer-btn1 layui-layer-btn1" onclick="closeModal(0)">驳回</a>
        </div>
    </body>

    <th:block th:include="include :: footer"/>
    <script th:src="@{/js/jquery.tmpl.js}"></script>
    <th:block th:include="include :: bootstrap-fileinput-js" />

    <script type="text/javascript">
        var smilePrefix = ctx + "smile/user";
        var penddingId = window.localStorage.getItem('penddingId');
        $.ajax({
            type: 'post',
            url: smilePrefix + "/getUserById",
            data: {
                uid: penddingId
            },
            success:function(e) {
                var detailData = e.data;
                if (detailData.type == 0) {
                    $('.detail_status span').text('未认证');
                }
                $('.detail_img img').attr('src', detailData.img);
                $('.detail_name').text(detailData.name);
                $('.detail_time').text(detailData.birthday);
                if (detailData.sex == 1) {
                    $('.detail_sex').text('男');
                } else {
                    $('.detail_sex').text('女');
                }
                $('.detail_city').text(detailData.province + detailData.city + detailData.area);
                if (detailData.identity == 1) {
                    $('.detail_id').text('在校学生');
                } else {
                    $('.detail_id').text('已毕业');
                }
                $('.detail_school').text(detailData.schoolName);
                $('.detail_acc').text(detailData.schoolMajor);
                $('.detail_wx').text(detailData.wechat);
                $('.detail_name').text(detailData.name);
                $('.detail_idcode').text(detailData.idCard);
                $('.detail_desc').text(detailData.introduce);
                $('.detail_mobail').text(detailData.phone);
                $('.detail_created').text(detailData.createdDate);
            }
        })
    </script>

    <style>
        .white-bg {
            padding: 50px;
        }
        .white-bg .detail_inner {
            margin-bottom: 20px;
        }
        .white-bg .detail_title {
            margin-top: 50px;
            font-weight: bold;
            font-size: 16px;
        }
        .bottomBtn {
            text-align: left;
            padding: 10px 15px 12px;
        }
    </style>

</html>