|  |  | 
 |  |  | <div class="layui-fluid layui-anim febs-anim" id="febs-user" lay-title="会员列表"> | 
 |  |  |     <div class="layui-row febs-container"> | 
 |  |  |         <div class="layui-col-md12"> | 
 |  |  |             <div class="layui-card"> | 
 |  |  |                 <div class="layui-card-body febs-table-full"> | 
 |  |  |                     <form class="layui-form layui-table-form" lay-filter="user-table-form"> | 
 |  |  |                         <div class="layui-row"> | 
 |  |  |                             <div class="layui-col-md10"> | 
 |  |  |                                 <div class="layui-form-item"> | 
 |  |  |                                     <div class="layui-inline"> | 
 |  |  |                                         <div class="layui-input-inline"> | 
 |  |  |                                             <input type="text" placeholder="手机号/邮箱/邀请码" name="account" autocomplete="off" class="layui-input"> | 
 |  |  |                                         </div> | 
 |  |  |                                     </div> | 
 |  |  |                                 </div> | 
 |  |  |                             </div> | 
 |  |  |                             <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area"> | 
 |  |  |                                 <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain table-action" id="query"> | 
 |  |  |                                     <i class="layui-icon"></i> | 
 |  |  |                                 </div> | 
 |  |  |                                 <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="reset"> | 
 |  |  |                                     <i class="layui-icon"></i> | 
 |  |  |                                 </div> | 
 |  |  |                             </div> | 
 |  |  |                         </div> | 
 |  |  |                     </form> | 
 |  |  |                     <table lay-filter="userTable" lay-data="{id: 'userTable'}"></table> | 
 |  |  |                 </div> | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |     </div> | 
 |  |  | </div> | 
 |  |  | <!-- 表格字段状态格式化 start --> | 
 |  |  | <script type="text/html" id="certify-status"> | 
 |  |  |     {{# | 
 |  |  |     var certifyStatus = { | 
 |  |  |     0: {title: '未通过', color: 'red'}, | 
 |  |  |     1: {title: '待审核', color: 'blue'}, | 
 |  |  |     2: {title: '审核通过', color: 'green'}, | 
 |  |  |     3: {title: '未实名'} | 
 |  |  |     }[d.certifyStatus]; | 
 |  |  |     }} | 
 |  |  |     <span class="layui-badge febs-tag-{{certifyStatus.color}}">{{ certifyStatus.title }}</span> | 
 |  |  | </script> | 
 |  |  | <script type="text/html" id="account-type"> | 
 |  |  |     {{# | 
 |  |  |     var accountType = { | 
 |  |  |     2: {title: '正常账号' , color: 'green'}, | 
 |  |  |     1: {title: '测试账号' , color: 'red'} | 
 |  |  |     }[d.accountType]; | 
 |  |  |     }} | 
 |  |  |     <span class="layui-badge febs-tag-{{accountType.color}}">{{ accountType.title }}</span> | 
 |  |  | </script> | 
 |  |  | <script type="text/html" id="account-status"> | 
 |  |  |     {{# | 
 |  |  |     var accountStatus = { | 
 |  |  |     1: {title: '正常', color : 'blue'}, | 
 |  |  |     0: {title: '禁用', color : 'red'} | 
 |  |  |     }[d.accountStatus]; | 
 |  |  |     }} | 
 |  |  |     <span class="layui-badge febs-bg-{{accountStatus.color}}">{{ accountStatus.title }}</span> | 
 |  |  | </script> | 
 |  |  | <!-- 表格字段状态格式化 start --> | 
 |  |  |  | 
 |  |  | <!-- 表格操作栏 start --> | 
 |  |  | <script type="text/html" id="user-option"> | 
 |  |  |     <span shiro:lacksPermission="user:view,user:update,user:delete"> | 
 |  |  |         <span class="layui-badge-dot febs-bg-orange"></span> 无权限 | 
 |  |  |     </span> | 
 |  |  |     <a lay-event="edit" shiro:hasPermission="user:update"><i | 
 |  |  |             class="layui-icon febs-edit-area febs-blue"></i></a> | 
 |  |  | </script> | 
 |  |  | <!-- 表格操作栏 end --> | 
 |  |  | <script data-th-inline="none" type="text/javascript"> | 
 |  |  |     // 引入组件并初始化 | 
 |  |  |     layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () { | 
 |  |  |         var $ = layui.jquery, | 
 |  |  |             laydate = layui.laydate, | 
 |  |  |             febs = layui.febs, | 
 |  |  |             form = layui.form, | 
 |  |  |             table = layui.table, | 
 |  |  |             dropdown = layui.dropdown, | 
 |  |  |             $view = $('#febs-user'), | 
 |  |  |             $query = $view.find('#query'), | 
 |  |  |             $reset = $view.find('#reset'), | 
 |  |  |             $searchForm = $view.find('form'), | 
 |  |  |             sortObject = {field: 'phone', type: null}, | 
 |  |  |             tableIns; | 
 |  |  |  | 
 |  |  |         form.render(); | 
 |  |  |  | 
 |  |  |         // 表格初始化 | 
 |  |  |         initTable(); | 
 |  |  |  | 
 |  |  |         // 初始化表格操作栏各个按钮功能 | 
 |  |  |         table.on('tool(userTable)', function (obj) { | 
 |  |  |             var data = obj.data, | 
 |  |  |                 layEvent = obj.event; | 
 |  |  |              | 
 |  |  |             if (layEvent === 'edit') { | 
 |  |  |                 febs.modal.open('身份认证', 'modules/member/memberDetail/' + data.id, { | 
 |  |  |                     area: $(window).width() <= 1000 ? '100%' : '50%', | 
 |  |  |                     btn: ['提交', '取消'], | 
 |  |  |                     yes: function (index, layero) { | 
 |  |  |                         $('#user-update').find('#submit').trigger('click'); | 
 |  |  |                     }, | 
 |  |  |                     btn2: function () { | 
 |  |  |                         layer.closeAll(); | 
 |  |  |                     } | 
 |  |  |                 }); | 
 |  |  |             } | 
 |  |  |         }); | 
 |  |  |          | 
 |  |  |  | 
 |  |  |         // 查询按钮 | 
 |  |  |         $query.on('click', function () { | 
 |  |  |             var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type}); | 
 |  |  |             tableIns.reload({where: params, page: {curr: 1}}); | 
 |  |  |         }); | 
 |  |  |  | 
 |  |  |         // 刷新按钮 | 
 |  |  |         $reset.on('click', function () { | 
 |  |  |             $searchForm[0].reset(); | 
 |  |  |             sortObject.type = 'null'; | 
 |  |  |             tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject}); | 
 |  |  |         }); | 
 |  |  |  | 
 |  |  |         function initTable() { | 
 |  |  |             tableIns = febs.table.init({ | 
 |  |  |                 elem: $view.find('table'), | 
 |  |  |                 id: 'userTable', | 
 |  |  |                 url: ctx + 'member/getList', | 
 |  |  |                 cols: [[ | 
 |  |  |                     {field: 'phone', title: '手机号', minWidth: 100,align:'left'}, | 
 |  |  |                     {field: 'email', title: '邮箱', minWidth: 200,align:'left'}, | 
 |  |  |                     {field: 'inviteId', title: '邀请码UID', minWidth: 80,align:'center'}, | 
 |  |  |                     {field: 'refererId', title: '上级邀请码UID', minWidth: 80,align:'center'}, | 
 |  |  |                     {title: '账号类型', templet: '#account-type', minWidth: 80,align:'center'}, | 
 |  |  |                     {title: '账号状态', templet: '#account-status', minWidth: 50,align:'center'}, | 
 |  |  |                     {title: '审核状态', templet: '#certify-status', minWidth: 80,align:'center'}, | 
 |  |  |                     {field: 'createTime', title: '注册时间', minWidth: 180,align:'center'}, | 
 |  |  |                     {title: '操作', toolbar: '#user-option', minWidth: 140, fixed : 'right'} | 
 |  |  |                 ]] | 
 |  |  |             }); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         // 获取查询参数 | 
 |  |  |         function getQueryParams() { | 
 |  |  |             return { | 
 |  |  |                 account: $searchForm.find('input[name="account"]').val().trim(), | 
 |  |  |             }; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |     }) | 
 |  |  | <div class="layui-fluid layui-anim febs-anim" id="febs-user" lay-title="会员列表">
 | 
 |  |  |     <div class="layui-row febs-container">
 | 
 |  |  |         <div class="layui-col-md12">
 | 
 |  |  |             <div class="layui-card">
 | 
 |  |  |                 <div class="layui-card-body febs-table-full">
 | 
 |  |  |                     <form class="layui-form layui-table-form" lay-filter="user-table-form">
 | 
 |  |  |                         <div class="layui-row">
 | 
 |  |  |                             <div class="layui-col-md10">
 | 
 |  |  |                                 <div class="layui-form-item">
 | 
 |  |  |                                     <div class="layui-inline">
 | 
 |  |  |                                         <div class="layui-input-inline">
 | 
 |  |  |                                             <input type="text" placeholder="手机号/邮箱/邀请码" name="account" autocomplete="off" class="layui-input">
 | 
 |  |  |                                         </div>
 | 
 |  |  |                                     </div>
 | 
 |  |  |                                     <div class="layui-inline">
 | 
 |  |  |                                         <label class="layui-form-label layui-form-label-sm">审核状态</label>
 | 
 |  |  |                                         <div class="layui-input-inline">
 | 
 |  |  |                                             <select name="certifyStatus">
 | 
 |  |  |                                                 <option value="">请选择</option>
 | 
 |  |  |                                                 <option value="1">待审核</option>
 | 
 |  |  |                                                 <option value="2">审核通过</option>
 | 
 |  |  |                                                 <option value="3">未实名</option>
 | 
 |  |  |                                             </select>
 | 
 |  |  |                                         </div>
 | 
 |  |  |                                     </div>
 | 
 |  |  |                                 </div>
 | 
 |  |  |                             </div>
 | 
 |  |  |                             <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area">
 | 
 |  |  |                                 <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain table-action" id="query">
 | 
 |  |  |                                     <i class="layui-icon"></i>
 | 
 |  |  |                                 </div>
 | 
 |  |  |                                 <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="reset">
 | 
 |  |  |                                     <i class="layui-icon"></i>
 | 
 |  |  |                                 </div>
 | 
 |  |  |                             </div>
 | 
 |  |  |                         </div>
 | 
 |  |  |                     </form>
 | 
 |  |  |                     <table lay-filter="userTable" lay-data="{id: 'userTable'}"></table>
 | 
 |  |  |                 </div>
 | 
 |  |  |             </div>
 | 
 |  |  |         </div>
 | 
 |  |  |     </div>
 | 
 |  |  | </div>
 | 
 |  |  | <!-- 表格操作栏 start -->
 | 
 |  |  | <script type="text/html" id="user-option">
 | 
 |  |  | <!--    <span shiro:lacksPermission="user:view,user:update,user:delete">-->
 | 
 |  |  | <!--        <span class="layui-badge-dot febs-bg-orange"></span> 无权限-->
 | 
 |  |  | <!--    </span>-->
 | 
 |  |  |     <a lay-event="edit" shiro:hasPermission="member:update">审核认证</a>
 | 
 |  |  |     <a lay-event="see"><i class="layui-icon febs-edit-area febs-blue"></i></a>
 | 
 |  |  | </script>
 | 
 |  |  | <!-- 表格操作栏 end -->
 | 
 |  |  | <script data-th-inline="none" type="text/javascript">
 | 
 |  |  |     // 引入组件并初始化
 | 
 |  |  |     layui.use([ 'jquery', 'form', 'table', 'febs'], function () {
 | 
 |  |  |         var $ = layui.jquery,
 | 
 |  |  |             febs = layui.febs,
 | 
 |  |  |             form = layui.form,
 | 
 |  |  |             table = layui.table,
 | 
 |  |  |             $view = $('#febs-user'),
 | 
 |  |  |             $query = $view.find('#query'),
 | 
 |  |  |             $reset = $view.find('#reset'),
 | 
 |  |  |             $searchForm = $view.find('form'),
 | 
 |  |  |             sortObject = {field: 'phone', type: null},
 | 
 |  |  |             tableIns;
 | 
 |  |  | 
 | 
 |  |  |         form.render();
 | 
 |  |  | 
 | 
 |  |  |         // 表格初始化
 | 
 |  |  |         initTable();
 | 
 |  |  | 
 | 
 |  |  |         // 初始化表格操作栏各个按钮功能
 | 
 |  |  |         table.on('tool(userTable)', function (obj) {
 | 
 |  |  |             var data = obj.data,
 | 
 |  |  |                 layEvent = obj.event;
 | 
 |  |  |              | 
 |  |  |             if (layEvent === 'edit') {
 | 
 |  |  |                 febs.modal.open('身份认证', 'modules/member/memberDetail/' + data.id, {
 | 
 |  |  |                     btn: ['提交', '取消'],
 | 
 |  |  |                     yes: function (index, layero) {
 | 
 |  |  |                         $('#user-update').find('#submit').trigger('click');
 | 
 |  |  |                     },
 | 
 |  |  |                     btn2: function () {
 | 
 |  |  |                         layer.closeAll();
 | 
 |  |  |                     }
 | 
 |  |  |                 });
 | 
 |  |  |             }
 | 
 |  |  |             if (layEvent === 'see') {
 | 
 |  |  |             febs.modal.open( '身份认证', 'modules/member/memberDetail/' + data.id, {
 | 
 |  |  |                 maxmin: true,
 | 
 |  |  |                 });
 | 
 |  |  |             }
 | 
 |  |  |             if (layEvent === 'addCoin') {
 | 
 |  |  |              febs.modal.open( '拨币', 'modules/member/addCoin/' + data.id, {
 | 
 |  |  |                    btn: ['提交', '取消'],
 | 
 |  |  |                    yes: function (index, layero) {
 | 
 |  |  |                        $('#user-update').find('#submit').trigger('click');
 | 
 |  |  |                    },
 | 
 |  |  |                    btn2: function () {
 | 
 |  |  |                        layer.closeAll();
 | 
 |  |  |                    }
 | 
 |  |  |                });
 | 
 |  |  |              }
 | 
 |  |  |             if (layEvent === 'examine') {
 | 
 |  |  |               febs.modal.open( '个人数据详情', 'modules/member/memberDetailInfo/' + data.inviteId, {
 | 
 |  |  |                   maxmin: true,
 | 
 |  |  |                   });
 | 
 |  |  |               }
 | 
 |  |  |         });
 | 
 |  |  |          | 
 |  |  | 
 | 
 |  |  |         // 查询按钮
 | 
 |  |  |         $query.on('click', function () {
 | 
 |  |  |             var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type});
 | 
 |  |  |             tableIns.reload({where: params, page: {curr: 1}});
 | 
 |  |  |         });
 | 
 |  |  | 
 | 
 |  |  |         // 刷新按钮
 | 
 |  |  |         $reset.on('click', function () {
 | 
 |  |  |             $searchForm[0].reset();
 | 
 |  |  |             sortObject.type = 'null';
 | 
 |  |  |             tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
 | 
 |  |  |         });
 | 
 |  |  | 
 | 
 |  |  |         function initTable() {
 | 
 |  |  |             tableIns = febs.table.init({
 | 
 |  |  |                 elem: $view.find('table'),
 | 
 |  |  |                 id: 'userTable',
 | 
 |  |  |                 url: ctx + 'member/getList',
 | 
 |  |  |                 cols: [[
 | 
 |  |  |                     {field: 'phone', title: '手机号', minWidth: 150,align:'left'},
 | 
 |  |  |                     {field: 'email', title: '邮箱', minWidth: 100,align:'left'},
 | 
 |  |  |                     {field: 'realName', title: '姓名', minWidth: 50,align:'left'},
 | 
 |  |  |                     {field: 'inviteId', title: '邀请码UID',
 | 
 |  |  |                        templet: function (d) {
 | 
 |  |  |                                 return '<a lay-event="examine" shiro:hasPermission="user:update">'+d.inviteId+'</a>'
 | 
 |  |  |                             }, minWidth: 80,align:'center'},
 | 
 |  |  |                     {field: 'refererId', title: '上级邀请码UID', minWidth: 80,align:'center'},
 | 
 |  |  |                     // {field: 'accountType', title: '账号类型',
 | 
 |  |  |                     //    templet: function (d) {
 | 
 |  |  |                     //         if (d.accountType === 2) {
 | 
 |  |  |                     //             return '<span style="color:green;">测试账号</span>'
 | 
 |  |  |                     //         } else if (d.accountType === 1) {
 | 
 |  |  |                     //             return '<span style="color:red;">正常账号</span>'
 | 
 |  |  |                     //         }else{
 | 
 |  |  |                     //             return ''
 | 
 |  |  |                     //         }
 | 
 |  |  |                     //     }, minWidth: 80,align:'center'},
 | 
 |  |  |                     {field: 'refererId', title: '账号状态',
 | 
 |  |  |                            templet: function (d) {
 | 
 |  |  |                                 if (d.accountStatus === 1) {
 | 
 |  |  |                                     return '<span style="color:green;">正常</span>'
 | 
 |  |  |                                 } else if (d.accountStatus === 0) {
 | 
 |  |  |                                     return '<span style="color:red;">禁用</span>'
 | 
 |  |  |                                 }else{
 | 
 |  |  |                                     return ''
 | 
 |  |  |                                 }
 | 
 |  |  |                             }, minWidth: 80,align:'center'},
 | 
 |  |  |                     {field: 'ipo', title: '私募',
 | 
 |  |  |                         templet: function (d) {
 | 
 |  |  |                             if (d.ipo === 1) {
 | 
 |  |  |                                 return '<span style="color:red;">是</span>'
 | 
 |  |  |                             } else if (d.ipo === 0) {
 | 
 |  |  |                                 return '<span style="color:gray;">否</span>'
 | 
 |  |  |                             }else{
 | 
 |  |  |                                 return '<span style="color:gray;">否</span>'
 | 
 |  |  |                             }
 | 
 |  |  |                         }, minWidth: 80,align:'center'},
 | 
 |  |  |                     {field: 'refererId', title: '审核状态',
 | 
 |  |  |                                templet: function (d) {
 | 
 |  |  |                                     if (d.certifyStatus === 0) {
 | 
 |  |  |                                         return '<span style="color:red;">未通过</span>'
 | 
 |  |  |                                     } else if (d.certifyStatus === 1) {
 | 
 |  |  |                                         return '<span style="color:blue;">待审核</span>'
 | 
 |  |  |                                     } else if (d.certifyStatus === 2) {
 | 
 |  |  |                                         return '<span style="color:green;">审核通过</span>'
 | 
 |  |  |                                     } else if (d.certifyStatus === 3) {
 | 
 |  |  |                                         return '<span>未实名</span>'
 | 
 |  |  |                                     }else{
 | 
 |  |  |                                         return ''
 | 
 |  |  |                                     }
 | 
 |  |  |                                 }, minWidth: 80,align:'center'},
 | 
 |  |  |                     {field: 'createTime', title: '注册时间', minWidth: 180,align:'center'},
 | 
 |  |  |                     {title: '操作', toolbar: '#user-option'
 | 
 |  |  |                        // templet: function (d) {
 | 
 |  |  |                         //     if (d.certifyStatus === 1) {
 | 
 |  |  |                         //        return ''
 | 
 |  |  |                         //        +'<i class="layui-icon febs-edit-area febs-blue"></i>'
 | 
 |  |  |                         //     }else {
 | 
 |  |  |                         //        return '<a lay-event="see" shiro:hasPermission="user:update">'
 | 
 |  |  |                         //        +'<i class="layui-icon febs-edit-area febs-blue"></i></a>'
 | 
 |  |  |                         //     }
 | 
 |  |  |                         // },
 | 
 |  |  |                         ,minWidth: 200,align:'center'}
 | 
 |  |  |                 ]]
 | 
 |  |  |             });
 | 
 |  |  |         }
 | 
 |  |  | 
 | 
 |  |  |         // 获取查询参数
 | 
 |  |  |         function getQueryParams() {
 | 
 |  |  |             return {
 | 
 |  |  |                 account: $searchForm.find('input[name="account"]').val().trim(),
 | 
 |  |  |                 certifyStatus: $searchForm.find("select[name='certifyStatus']").val(),
 | 
 |  |  |             };
 | 
 |  |  |         }
 | 
 |  |  | 
 | 
 |  |  |     })
 | 
 |  |  | </script> |