Merge branch 'feature/group_type' into dev

master
zhengchanglong 5 years ago
commit 8144e3c50f

@ -1230,7 +1230,12 @@ class MemberController extends ThinkController
if ($accounts) $map['account'] = ['in', array_unique(explode("\n", $accounts))];
if ($id) $map['id'] = ['in', array_unique(explode("\n", $id))];
$users = M('user', 'tab_')->where($map)->field('id')->select();
$res = M('user', 'tab_')->where($map)->setField(['lock_status' => $lock_status]);
if($_POST['lock_remark']){
$res = M('user', 'tab_')->where($map)->setField(['lock_status' => $lock_status,"lock_remark" => $_POST['lock_remark']]);
}else{
$res = M('user', 'tab_')->where($map)->setField(['lock_status' => $lock_status]);
}
if ($res) {
foreach ($users as $item) {
\Think\Log::actionLog('Member/lock_status', 'Member', $item['id']);

@ -13,7 +13,7 @@
<div class="tab-content tabcon1711">
<!-- 表单 -->
<form id="form" action="{:U('edit?model='.$model['id'])}" method="post" class="form-horizontal">
<form id="form" action="{:U('edit?id='.$model['id'])}" method="post" class="form-horizontal">
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">基本信息</h3>
<p class="description_text">说明:此处显示本站玩家账号的相关信息</p>
@ -55,16 +55,19 @@
<tr>
<td class="l noticeinfo">账号状态</td>
<td class="r table_radio">
<span class="form_radio table_btn player_table_btn">
<label>
<input type="radio" value="1" name="lock_status"
<eq name="data['lock_status']" value="1">checked="checked"</eq>> 开启
</label>
<label>
<input type="radio" value="0" name="lock_status"
<eq name="data['lock_status']" value="0">checked="checked"</eq>> {:L('Lock')}
</label>
</span>
<span class="form_radio table_btn player_table_btn">
<label>
<if condition="get_info_status($data['lock_status'],4) eq 锁定">
已锁定&nbsp;
<a class="ajax-get" href="{:U('Member/lock_status',array('id'=>$data['id'],'lock_status'=>1))}">启用 </a>
<input type="hidden" name="lock_status" value="0">
<else />
正常&nbsp;
<a href="javascript:void();" id="lock" data-url="{:U('Member/lock_status',array('id'=>$data['id'],'lock_status'=>0))}">{:L('Lock')}</a>
<input type="hidden" name="lock_status" value="1">
</if>
</label>
</span>
<span class="notice-text">可设置玩家账号的登录状态,锁定即无法登录本平台</span>
</td>
</tr>
@ -475,4 +478,32 @@
});
});
</script>
<script>
$("#lock").bind("click",function () {
var url = $(this).attr("data-url");
layer.prompt({
formType: 3,
title: "请备注锁定原因",
value: ''
}, function (remark,index) {
$.ajax({
cache: true,
type: "POST",
url: url,
data:{
lock_remark:remark
},
async: false,
error: function(data) {
layer.alert("服务器故障,请稍后重试!",{icon: 2});
},
success: function(data) {
location.reload()
}
});
layer.close(index);
});
})
</script>
</block>

@ -211,12 +211,12 @@
<th>
金币
</th>
<th>
绑定支付宝
</th>
<th>
小号
</th>
<!-- <th>
绑定支付宝
</th>
<th>
小号
</th>-->
<th>
VIP等级
</th>
@ -275,13 +275,13 @@
<td >{$data.balance}</td>
<td >{$data.recharge_total}</td>
<td >{$data.gold_coin|default='0.00'}</td>
<td >{$data.alipay|default='--'}</td>
<!--<td >{$data.alipay|default='&#45;&#45;'}</td>
<td >
<gt name="data.small_count" value="0">
<a class="jssamlllist" data-url="{:U('Member/small_list',array('id'=>$data['id'],'account'=>$data['account']))}" data-account="{$data.account}" href="javascript:;">{$data.small_count|default=0}</a>
<else />--
<else />&#45;&#45;
</gt>
</td>
</td>-->
<td>{:get_vip_level($data['recharge_total'])}</td>
<if condition="I('type') eq 1 or I('type') eq ''">
<td >
@ -321,8 +321,11 @@
</eq>
<td >
<a href="{:U('Member/edit?id='.$data['id'])}">查看 </a>
<a class="ajax-get" href="{:U('Member/lock_status',array('id'=>$data['id'],'lock_status'=>1))}">启用 </a>
<a class="ajax-get" href="{:U('Member/lock_status',array('id'=>$data['id'],'lock_status'=>0))}">{:L('Lock')}</a>
<if condition="get_info_status($data['lock_status'],4) eq 锁定">
<a class="ajax-get" href="{:U('Member/lock_status',array('id'=>$data['id'],'lock_status'=>1))}">启用 </a>
<else />
<a href="javascript:void();" id="lock" data-url="{:U('Member/lock_status',array('id'=>$data['id'],'lock_status'=>0))}">{:L('Lock')}</a>
</if>
</td>
</tr>
</volist>
@ -355,7 +358,7 @@
<div class="page">
<if condition="$is_admin eq true ">
<a class="sch-btn export-btn"
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
<!-- <a class="sch-btn" href="{:U('Export/expUser',array_merge(['id'=>3,'xlsname'=>'玩家_玩家列表_'.(I('get.type')==2?'第三方玩家':'本站玩家')],I('get.')))}">导出</a> -->
</if>
{$_page|default=''}
@ -582,4 +585,31 @@
}
</script>
<script>
$("#lock").bind("click",function () {
var url = $(this).attr("data-url");
layer.prompt({
formType: 3,
title: "请备注锁定原因",
value: ''
}, function (remark,index) {
$.ajax({
cache: true,
type: "POST",
url: url,
data:{
lock_remark:remark
},
async: false,
error: function(data) {
layer.alert("服务器故障,请稍后重试!",{icon: 2});
},
success: function(data) {
location.reload()
}
});
layer.close(index);
});
})
</script>
</block>

Loading…
Cancel
Save