<style>
    .auth-binding-down {
    line-height: 38px;
}
</style>
<title>认证管理</title>

<div class="layui-card layadmin-header">
<div class="layui-breadcrumb" lay-filter="breadcrumb">
    <a lay-href="">控制台</a>
    <a><cite>认证管理</cite></a>
    <a><cite>已审认证</cite></a>
</div>
</div>

<div class="layui-fluid">
  <div class="layui-row layui-col-space15">
      <div class="layui-col-md12">
          <div class="layui-card">
              <div class="layui-tab layui-tab-brief layadmin-latestData" lay-filter="atb">
                <ul class="layui-tab-title">
                    <li lay-id="ad" class="layui-this">专家/企业认证</li>
                    <li lay-id="adc">实名认证</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">
                        <!-- 认证列表 -->
                        <div style="padding-bottom: 10px;">
                          <a href="wendasns/homerecod/remove" class="layui-btn J_req" title="确定要删除吗？"><i class="layui-icon layui-icon-delete"></i>删除</a>
                        </div>               
                        <table id="J_table_list" lay-filter="J_table_list"></table>
                        <script type="text/html" id="mous-table-cz">
                            <a href="#J_views" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="popup" title="查看详情"><i class="layui-icon layui-icon-edit"></i>查看详情</a>
                          </script> 
                          <script type="text/html" id="mous-table-type">
                            {{# if(d.authtype == 2) {}} 企业认证 {{# } else { }} 专家认证 {{# } }}                
                          </script>

                          <script type="text/html" id="J_table_authimage">
                            <div>{{# if(d.id_card_image){ }}<a href="{{d.id_card_image}}" target="_blank"><img src="{{d.id_card_image}}"/></a><a class="J_photos" style="float: right;" href="{{d.id_card_image}}" target="_blank" title="看大图"><i class="layui-icon layui-icon-search"></i></a>{{# }else{ }}<img src="{{d.id_card_image}}"/>{{# } }}</div>
                        </script>
                        
                        <script type="text/html" id="J_table_authskill">
                            <div>{{# if(d.skill_image){ }}<a href="{{d.skill_image}}" target="_blank"><img src="{{d.skill_image}}"/></a><a class="J_photos" style="float: right;" href="{{d.skill_image}}" target="_blank" title="看大图"><i class="layui-icon layui-icon-search"></i></a>{{# }else{ }}<img src="{{d.skill_image}}"/>{{# } }}</div>
                        </script>
                    </div>

                    <div class="layui-tab-item">
                        <!-- 审核通过 -->
                        <div style="padding-bottom: 10px;">
                            <a href="wendasns/homerecod/remove" class="layui-btn J_req" title="确定要删除吗？"><i class="layui-icon layui-icon-delete"></i>删除</a>
                          </div>               
                          <table id="J_table_rlists" lay-filter="J_table_list"></table>
                          <script type="text/html" id="mous-table-real">
                            <a href="#J_views" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="popup" title="查看详情"><i class="layui-icon layui-icon-edit"></i>查看详情</a>
                            </script> 
                            <script type="text/html" id="mous-table-rtype">
                              {{# if(d.auths == 1) {}}实名认证{{# } }}      
                            </script>
                            <script type="text/html" id="J_table_authpic">
                                <div>{{# if(d.id_card_image){ }}<a href="{{d.id_card_image}}" target="_blank"><img src="{{d.id_card_image}}"/></a><a class="J_photos" style="float: right;" href="{{d.id_card_image}}" target="_blank" title="看大图"><i class="layui-icon layui-icon-search"></i></a>{{# }else{ }}<img src="{{d.id_card_image}}"/>{{# } }}</div>
                            </script>
                    </div>
                </div>
              </div>              
          </div>
      </div>
  </div>
</div>
<script>
;!function(){
    var $ = layui.$
  ,form = layui.form
  ,element = layui.element
  ,upload = layui.upload
  ,table =layui.table
  ,router = layui.router()
  ,laydate = layui.laydate

  form.render();
    table.render({
      elem: '#J_table_list'
      ,height: 'auto'
      ,url: '{:url('wendasns/userlist/lists')}' //数据接口
      ,page: true //开启分页
      ,limit: 16
      ,cols: [[ //表头
      	{type:'checkbox'}
        ,{field:'type',title:'认证类型',width:120,align:'center',templet:'#mous-table-type'}
        ,{field:'real_name',title:'姓名/企业名称',Width:120,align:'center'}
      ,{field:'id_card',title:'身份证号/企业执照号',minWidth:120,align:'center'}
      ,{field:'id_card_image',title:'身份证/企业执照照片',Width:120,align:'center',templet:'#J_table_authimage'}
      ,{field:'skill_image',title:'附件二',Width:120,align:'center',templet:'#J_table_authskill'}
      ,{field:'cz',title:'操作选项',width:180, toolbar: '#mous-table-cz',align:'center'}
  
      ]]
      ,text: {
        none: '无任何数据！' //默认：无数据。
      }
    });

    //实名通过
    table.render({
      elem: '#J_table_rlists'
      ,height: 'auto'
      ,url: '{:url('wendasns/userlist/rlists')}' //数据接口
      ,page: true //开启分页
      ,limit: 16
      ,cols: [[ //表头
      	{type:'checkbox'}
        ,{field:'type',title:'认证类型',width:120,align:'center',templet:'#mous-table-rtype'}
        ,{field:'real_name',title:'姓名',width:120,align:'center'}
      ,{field:'id_card',title:'身份证号',minWidth:120,align:'center'}
      ,{field:'id_card_image',title:'身份证照片',Width:120,align:'center',templet:'#J_table_authpic'}
      ,{field:'cz',title:'操作选项',width:180, toolbar: '#mous-table-real',align:'center'}
  
      ]]
      ,text: {
        none: '无任何数据！' //默认：无数据。
      }
    });

    /* Hash地址的定位 */
    var layid = router.hash.replace(/^#home=/, '');
      layid && element.tabChange('atb', layid);
      
      element.on('tab(atb)', function(elem){
        location.hash = '/'+ layui.router().path.join('/') + '#home=' + $(this).attr('lay-id');
      });
    
}();

</script>
<script type="text/html" id="J_views">
    <form class="layui-form">
        <div class="layui-form-item">
            <label class="layui-form-label">认证类型：</label>
            <div class="layui-input-block auth-binding-down">
                {{# if(d.auths == 1) { }}
                实名认证
                {{# } else if(d.authtype==2) { }}  
                企业认证
                {{# } else { }} 
                专家认证
                {{# }}}
            </div>
        </div>
        {{# if(d.authtype) { }}
        <div class="layui-form-item">
            <label class="layui-form-label">认证领域：</label>
            <div class="layui-input-block auth-binding-down">
                {{d.field||''}}
            </div>
        </div>
        {{# }}}

        {{# if(d.auths == 1) { }}

        <div class="layui-form-item">
            <label class="layui-form-label">真实姓名：</label>
            <div class="layui-input-block auth-binding-down">
                {{d.real_name||''}}
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 85px;">身份证号码：</label>
            <div class="layui-input-block auth-binding-down">
                {{d.id_card||''}}
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">自我介绍：</label>
            <div class="layui-input-block auth-binding-down">
                {{d.description||''}}
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">附件一：</label>
            <div class="layui-input-block auth-binding-down">
                <img src="{{d.id_card_image||''}}" alt="">
                
            </div>
        </div>
        {{# }}}
        {{# if(d.authtype == 3) { }}
        <div class="layui-form-item">
            <label class="layui-form-label">真实姓名：</label>
            <div class="layui-input-block auth-binding-down">
                {{d.real_name||''}}
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 85px;">身份证号码：</label>
            <div class="layui-input-block auth-binding-down">
                {{d.id_card||''}}
            </div>
        </div>
        {{# }}}
        {{# if(d.authtype == 2) { }}
        <div class="layui-form-item">
            <label class="layui-form-label">机构名称：</label>
            <div class="layui-input-block auth-binding-down">
                {{d.real_name||''}}
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">执照代码：</label>
            <div class="layui-input-block auth-binding-down">
                {{d.id_card||''}}
            </div>
        </div>
        {{# }}}
        

        {{# if(d.id_card_image) { }}
        <div class="layui-form-item">
            <label class="layui-form-label">附件一：</label>
            <div class="layui-input-block auth-binding-down">
                <img src="{{d.id_card_image||''}}" alt="" width="50%">
            </div>
        </div>
        {{# }}}

        {{# if(d.skill_image) { }}
        <div class="layui-form-item">
            <label class="layui-form-label">附件二：</label>
            <div class="layui-input-block auth-binding-down">
                <img src="{{d.skill_image||''}}" alt="" width="50%">
            </div>
        </div>
        {{# }}}
        <div class="layui-form-item">
            <label class="layui-form-label">提交时间：</label>
            <div class="layui-input-block auth-binding-down">
                {{d.create_time||''}}
            </div>
        </div>    
    </form> 
</script>