master
yulingwei 5 years ago
parent 8fee02fc4c
commit 12362190e6

@ -790,12 +790,16 @@ class MemberController extends ThinkController
* @param $id
* @param $lock_status
*/
public function lock_status($id, $lock_status)
public function lock_status($id="", $lock_status, $accounts = "")
{
$map['id'] = ['in', array_unique(explode(',', $id))];
if ($accounts) $map['account'] = ['in', array_unique(explode(',', $accounts))];
if ($id) $map['id'] = ['in', array_unique(explode(',', $id))];
$users = M('user', 'tab_')->where($map)->field('id')->select();
$res = M('user', 'tab_')->where($map)->setField(['lock_status' => $lock_status]);
if ($res) {
\Think\Log::actionLog('Member/lock_status', 'Member', $id);
foreach ($users as $item) {
\Think\Log::actionLog('Member/lock_status', 'Member', $item['id']);
}
$this->success('操作成功!');
} else {
$this->error('操作失败!');

@ -239,7 +239,7 @@
<else/>
<volist name="list_data" id="data">
<tr>
<td ><input class="ids" type="checkbox" value="{$data.id}" name="ids[]"></td>
<td ><input class="ids" type="checkbox" value="{$data.account}" name="ids[]"></td>
<td >{$data.id}</td>
<if condition="I('type') eq 2">
<td >{:get_registertype($data['register_type'])}</td>
@ -490,8 +490,8 @@ $(function(){
layer.prompt({
formType: 2,
value: text,
placeholder : '账户ID(英文逗号隔开)',
title: '请输入要'+desc+'的账户ID(英文逗号隔开)',
placeholder : '玩家账号(英文逗号隔开)',
title: '请输入要'+desc+'的玩家账号(英文逗号隔开)',
area: ['800px', '350px'] //自定义文本域宽高
}, function(value, index, elem){
if(value=='') {
@ -503,7 +503,7 @@ $(function(){
cache: true,
type: "POST",
url:"{:U('Member/lock_status')}",
data:{id:value, lock_status:status},// 你的formid
data:{accounts:value, lock_status:status},// 你的formid
async: false,
error: function(data) {
layer.alert("服务器故障,请稍后重试!",{icon: 2});

Loading…
Cancel
Save