123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447 |
- {include file="public/layout" /}
-
- <body class="bodystyle" style="cursor: default; -moz-user-select: inherit;">
- <div id="append_parent"></div>
- <div id="ajaxwaitid"></div>
- {include file="member/left" /}
- <div class="page min-hg-c-10" style="min-width:auto;margin-left:100px;">
- <div class="flexigrid flexigrid-xin member_lt">
- <div class="mDiv pt0">
- <div class="ftitle">
- {eq name="'Member@users_batch_add'|is_check_access" value="1"}
- <div class="fbutton">
- <a href="javascript:void(0);" data-href="{:url('Member/users_batch_add')}" onclick="openFullframe(this, '新增会员','60%','80%');">
- <div class="add" title="新增会员">
- <span><i class="layui-icon layui-icon-addition"></i>新增会员</span>
- </div>
- </a>
- </div>
- {/eq}
- </div>
- </div>
- <div class="header-bar mb20">
- <div class="more">
- <div class="search">
- <div class="content">
- <form id="postForm" action="{:url('Member/users_index')}" method="get" onsubmit="layer_loading('正在处理');" style="display: unset;">
- {$searchform.hidden|default=''}
-
- <div class="ey-form-item"><label class="users-form-item-label">关键词:</label>
- <div class="users-form-item-content">
- <div class="users-select">
- <div tabindex="0" class="users-select-selection">
- <div class="sDiv2">
- <input type="text" size="50" name="keywords" value="{$Request.param.keywords}" class="qsbox w220" placeholder="会员名/昵称/手机号/邮箱/会员ID">
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div class="ey-form-item">
- <label class="users-form-item-label">会员来源:</label>
- <div class="users-form-item-content">
- <div class="users-select">
- <div tabindex="0" class="users-select-selection">
- <div>
- <select name="source">
- <option value="">全部</option>
- <option value="1" {eq name="$Request.param.source" value="1"}selected{/eq}>PC端</option>
- <option value="2" {eq name="$Request.param.source" value="2"}selected{/eq}>H5</option>
- <option value="3" {eq name="$Request.param.source" value="3"}selected{/eq}>微信公众号</option>
- <option value="4" {eq name="$Request.param.source" value="4"}selected{/eq}>微信小程序</option>
- <option value="5" {eq name="$Request.param.source" value="5"}selected{/eq}>百度小程序</option>
- <option value="6" {eq name="$Request.param.source" value="6"}selected{/eq}>抖音小程序</option>
-
- </select>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="ey-form-item"><label class="users-form-item-label">会员等级:</label>
- <div class="users-form-item-content">
- <div class="users-select">
- <div tabindex="0" class="users-select-selection">
- <div class="">
- <select name="level" id="level">
- <option value="" >全部</option>
- {foreach name="$level" item="vo" key="k" }
- <option value="{$vo.level_id}" {eq name="$Request.param.level" value="$vo.level_id"}selected{/eq}>{$vo.level_name}</option>
- {/foreach}
- </select>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="ey-form-item"><label class="users-form-item-label">注册时间:</label>
- <div class="users-form-item-content">
- <div class="users-select">
- <div tabindex="0" class="users-select-selection">
- <div class="sDiv2">
- <input type="text" name="add_time" id="eYLaydateTimeLinkage" data-max_date="{php}echo date('Y-m-d');{/php}" autocomplete="off" class="qsbox" placeholder="会员注册时间" lay-key="1" style="width: 220px;" value="{$Request.param.add_time}">
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="ey-form-item"><label class="users-form-item-label">黑名单:</label>
- <div class="users-form-item-content">
- <div class="users-select">
- <div tabindex="0" class="users-select-selection">
- <div class="">
- <select name="is_lock">
- <option value="">全部</option>
- <option value="-99" {eq name="$Request.param.is_lock" value="-99"}selected{/eq}>是</option>
- <option value="0" {eq name="$Request.param.is_lock" value="0"}selected{/eq}>否</option>
- </select>
- </div>
- </div>
- </div>
- </div>
- </div>
- </form>
- <div class="ey-form-item" style="margin-left: 20px;">
- <div class="users-form-item-content">
- <span class="bt-xin" onclick="OrderQuery();">查询</span>
- <span class="bt-xin-no" onclick="OrderQuery('reset');">重置</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="flexigrid">
- <div class="hDiv">
- <div class="hDivBox">
- <table cellspacing="0" cellpadding="0" style="width: 100%">
- <thead>
- <tr>
- <th class="sign w40" axis="col0">
- <div class="tc"><input type="checkbox" autocomplete="off" class="checkAll"></div>
- </th>
- <th abbr="article_title" axis="col3" class="w40">
- <div class="tc">ID</div>
- </th>
- <th abbr="article_title" axis="col3" class="w50">
- <div class="tc">头像</div>
- </th>
- <th abbr="ac_id" axis="col4">
- <div class="tl text-l10">昵称/绑定</div>
- </th>
- <th abbr="ac_id" axis="col4" class="w100">
- <div class="tc">级别</div>
- </th>
- <th abbr="ac_id" axis="col4" class="w60">
- <div class="tc">激活</div>
- </th>
- <th abbr="ac_id" axis="col4" class="w150">
- <div class="tc">注册日期</div>
- </th>
- <th axis="col1" class="w120">
- <div class="tc">操作</div>
- </th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <div class="bDiv" style="height: auto;">
- <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
- <table style="width: 100%">
- <tbody>
- {empty name="list"}
- <div class="no-data">
- <div class="no_row">
- <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
- </div>
- </div>
- {else/}
- {foreach name="list" item="vo" key="k" }
- <tr>
- <td class="sign">
- <div class="w40 tc">
- <input type="checkbox" autocomplete="off" name="ids[]" value="{$vo.users_id}">
- </div>
- </td>
- <td class="sort">
- <div class="w40 tc">{$vo.users_id}</div>
- </td>
- <td class="sign">
- <div class="w50 tc">
- <img id="img_head_pic" style="height: 40px;margin-right: 5px;float: unset;margin: auto;" src="{$vo.head_pic|get_head_pic=###,false,$vo['sex']}" />
- </div>
- </td>
- <td style="width: 100%">
- <div class="text-l10">
- <p style="margin-top: -5px;">
- {eq name="'Member@users_edit'|is_check_access" value="1"}
- <a href="{:url('Member/users_edit',array('id'=>$vo['users_id']))}">{$vo.nickname|default=$vo.username}</a>
- {else /}
- {$vo.nickname|default=$vo.username}
- {/eq}
- </p>
-
- <p class="binding">
- {if condition="$vo['is_mobile'] == 1 && !empty($vo['mobile'])"}
- <img src="__STATIC__/admin/images/r_phone.png">
- {/if}
- {if condition="in_array($vo['thirdparty'], [5]) || !empty($wxlogin[$vo['users_id']]['openid'])"}
- <img src="__STATIC__/admin/images/r_weixin.png">
- {/if}
- {if condition="in_array($vo['thirdparty'], [6])"}
- <img src="__STATIC__/admin/images/r_wechat.png">
- {/if}
- {if condition="!empty($qqlogin[$vo['users_id']])"}
- <img src="__STATIC__/admin/images/r_qq.png">
- {/if}
- {if condition="in_array($vo['thirdparty'], [4])"}
- <img src="__STATIC__/admin/images/r_wxapp.png">
- {/if}
- {if condition="!empty($wblogin[$vo['users_id']])"}
- <img src="__STATIC__/admin/images/r_wb.png">
- {/if}
- </p>
- </div>
- </td>
- <td>
- <div class="w100 tc">
- {$vo.level_name}
- </div>
- </td>
- <td class="">
- <div class="w60 tc">
- {eq name="$vo['is_activation']" value='1'}
- <span class="yes" {eq name="'Member@users_edit'|is_check_access" value="1"}onclick="changeIsActivation('users','users_id','{$vo.users_id}','is_activation',this);"{/eq} data-value="0"><i class="fa fa-check-circle"></i>是</span>
- {else /}
- <span class="no" {eq name="'Member@users_edit'|is_check_access" value="1"}onclick="changeIsActivation('users','users_id','{$vo.users_id}','is_activation',this);"{/eq} data-value="1"><i class="fa fa-ban"></i>否</span>
- {/eq}
- </div>
- </td>
- <td>
- <div class="w150 tc">
- {$vo.reg_time|MyDate='Y-m-d H:i:s',###}
- </div>
- </td>
- <td class="operation">
- <div class="w120 tc">
- {eq name="'Member@users_edit'|is_check_access" value="1"}
- <a href="{:url('Member/users_edit',array('id'=>$vo['users_id']))}" class="btn blue">编辑</a>
- {/eq}
- {eq name="'Member@users_del'|is_check_access" value="1"}
- <i></i>
- <a class="btn red" href="javascript:void(0);" data-url="{:url('Member/users_del')}" data-id="{$vo.users_id}" data-admin_id="{$vo.admin_id}" data-username="{$vo.username}" onclick="usersdel(this);">删除</a>
- {/eq}
- </div>
- </td>
- </tr>
- {/foreach}
- {/empty}
- </tbody>
- </table>
- </div>
- <div class="iDiv" style="display: none;"></div>
- </div>
- {notempty name="list"}
- <div class="footer-oper">
- {eq name="'Member@users_del'|is_check_access" value="1"}
- <span class="ml15">
- <input type="checkbox" autocomplete="off" class="checkAll">
- </span>
- <div class="nav-dropup">
- <a onclick="batch_del(this, 'ids');" data-url="{:url('Member/users_del')}" class="layui-btn layui-btn-primary">
- <div class="add">
- <span>批量删除</span>
- </div>
- </a>
- </div>
- {/eq}
- {include file="public/page" /}
- <div style="clear:both"></div>
- </div>
- {/notempty}
- </div>
- </div>
- <script>
- $(function(){
- $('input[name*=ids]').click(function(){
- if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
- $('.checkAll').prop('checked','checked');
- } else {
- $('.checkAll').prop('checked', false);
- }
- });
- $('input[type=checkbox].checkAll').click(function(){
- $('input[type=checkbox]').prop('checked',this.checked);
- });
- });
- $(document).ready(function(){
- // 表格行点击选中切换
- $('#flexigrid > table>tbody >tr').click(function(){
- $(this).toggleClass('trSelected');
- });
-
- // 点击刷新数据
- $('.fa-refresh').click(function(){
- location.href = location.href;
- });
- });
-
- // 删除
- function usersdel(obj){
- var admin_id = $(obj).data('admin_id');
- if (0 < admin_id) {
- var title = "系统管理员前台ID,删除不可恢复?<br/>包含该会员数据有(订单、投稿、问答、留言等)";
- } else {
- var title = "是否删除该会员?删除后不可找回。<br/>包含该会员数据有(订单、投稿、问答、留言等)";
- }
- layer.confirm(title, {
- shade: layer_shade,
- area: ['480px', '200px'],
- move: false,
- title: '提示',//$(obj).attr('data-username'),
- btnAlign:'r',
- closeBtn: 3,
- btn: ['确定','取消'], //按钮
- success: function () {
- $(".layui-layer-content").css('text-align', 'left');
- }
- }, function(){
- layer_loading('正在处理');
- // 确定
- $.ajax({
- type : 'post',
- url : $(obj).attr('data-url'),
- data : {del_id:$(obj).attr('data-id'), _ajax:1},
- dataType : 'json',
- success : function(data){
- layer.closeAll();
- if(data.code == 1){
- layer.msg(data.msg, {icon: 1});
- window.location.reload();
- }else{
- layer.alert(data.msg, {icon: 2, title:false});
- }
- }
- })
- }, function(index){
- layer.close(index);
- });
- return false;
- }
-
- /**
- * 批量删除提交
- */
- function batch_del(obj, name) {
- var a = [];
- $('input[name^='+name+']').each(function(i,o){
- if($(o).is(':checked')){
- a.push($(o).val());
- }
- })
- if(a.length == 0){
- layer.alert('请至少选择一项', {
- shade: layer_shade,
- area: ['480px', '190px'],
- move: false,
- title: '提示',
- btnAlign:'r',
- closeBtn: 3,
- success: function () {
- $(".layui-layer-content").css('text-align', 'left');
- }
- });
- return;
- }
- // 删除按钮
- layer.confirm('确认批量彻底删除?<br/>包含该会员数据有(订单、投稿、问答、留言等)', {
- shade: layer_shade,
- area: ['480px', '190px'],
- move: false,
- title: '提示',
- btnAlign:'r',
- closeBtn: 3,
- btn: ['确定', '取消'] ,//按钮
- success: function () {
- $(".layui-layer-content").css('text-align', 'left');
- }
- }, function () {
- layer_loading('正在处理');
- $.ajax({
- type: "POST",
- url: $(obj).attr('data-url'),
- data: {del_id:a, _ajax:1},
- dataType: 'json',
- success: function (data) {
- layer.closeAll();
- if(data.code == 1){
- layer.msg(data.msg, {icon: 1});
- window.location.reload();
- }else{
- layer.alert(data.msg, {icon: 2, title:false});
- }
- },
- error:function(e){
- layer.closeAll();
- layer.alert(e.responseText, {icon: 2, title:false});
- }
- });
- }, function (index) {
- layer.closeAll(index);
- });
- }
-
- $(document).keydown(function(event){
- if(event.keyCode ==13){
- OrderQuery();
- }
- });
-
- // 订单查询
- function OrderQuery(isReset) {
- if (isReset && 'reset' == isReset) {
- window.location.href = "{:url('Member/users_index')}";
- } else {
- $('#postForm').submit();
- }
- }
-
- function changeIsActivation(table,id_name,id_value,field,obj) {
- var is_activation = $(obj).data('value');
- console.log(is_activation)
- var title = '';
- if (0 == is_activation) {
- title = '确认关闭激活吗?关闭后前台该会员将无法登录!';
- } else if (1 == is_activation) {
- title = '确认激活吗?激活后会员将可以前台登录';
- }
-
- // 删除按钮
- layer.confirm(title, {
- shade: layer_shade,
- area: ['480px', '190px'],
- move: false,
- title: '提示',
- btnAlign:'r',
- closeBtn: 3,
- btn: ['确定', '取消'] ,//按钮
- success: function () {
- $(".layui-layer-content").css('text-align', 'left');
- }
- }, function () {
- changeTableVal(table,id_name,id_value,field,obj);
- layer.closeAll();
- }, function (index) {
- layer.closeAll();
- });
-
- }
-
- </script>
- <!-- 日期联动选择js文件 start -->
- <script type="text/javascript" src="__PUBLIC__/static/common/js/ey_laydate_time_linkage.js?v={$version}"></script>
- <!-- 日期联动选择js文件 end -->
- {include file="public/footer" /}
|