作者 刘朕
1 个管道 的构建 通过 耗费 0 秒

合并分支 '1iuzhen' 到 'master'

后台隐藏删除用户功能



查看合并请求 !62
... ... @@ -259,32 +259,19 @@ class MemberController extends AdminBaseController
$objWriter->save('php://output');
}
/**
* 删除表单字段
* @adminMenu(
* 'name' => '删除表单字段',
* 'parent' => 'index',
* 'display'=> false,
* 'hasView'=> false,
* 'order' => 4,
* 'icon' => '',
* 'remark' => '删除表单字段',
* 'param' => ''
* )
*/
public function delete()
{
$id = $this->request->param('id',0,'intval');
$ids = $this->request->param('ids/a');
if(isset($id)) {
$result = $this->member_model->where(['id'=>$id])->update(['delete_time'=>time()]);
}
if(isset($ids)) {
$result = $this->member_model->where(['id'=>['in',$ids]])->update(['delete_time'=>time()]);
}
if(!$result) {
$this->error('删除失败');
}
$this->success('删除成功');
}
// public function delete()
// {
// $id = $this->request->param('id',0,'intval');
// $ids = $this->request->param('ids/a');
// if(isset($id)) {
// $result = $this->member_model->where(['id'=>$id])->update(['delete_time'=>time()]);
// }
// if(isset($ids)) {
// $result = $this->member_model->where(['id'=>['in',$ids]])->update(['delete_time'=>time()]);
// }
// if(!$result) {
// $this->error('删除失败');
// }
// $this->success('删除成功');
// }
}
\ No newline at end of file
... ...
... ... @@ -34,12 +34,12 @@
<input type="button" class="btn btn-primary" id="excel" value="导出"/>
</form>
<form class="js-ajax-form" action="" method="post">
<div class="table-actions">
<button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
data-action="{:url('Member/delete')}" data-subcheck="true" data-msg="您确定删除吗?">
{:lang('DELETE')}
</button>
</div>
<!--<div class="table-actions">-->
<!--<button class="btn btn-danger btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('Member/delete')}" data-subcheck="true" data-msg="您确定删除吗?">-->
<!--{:lang('DELETE')}-->
<!--</button>-->
<!--</div>-->
<table class="table table-hover table-bordered table-list">
<thead>
<tr>
... ... @@ -86,7 +86,7 @@
<td>{:date('Y-m-d H:i',$vo.create_time)}</td>
<td>
<a href="{:url('Member/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
<a href="{:url('Member/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
<!--<a href="{:url('Member/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>-->
</td>
</tr>
</foreach>
... ... @@ -110,12 +110,12 @@
</tr>
</tfoot>
</table>
<div class="table-actions">
<button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
data-action="{:url('Member/delete')}" data-subcheck="true" data-msg="您确定删除吗?">
{:lang('DELETE')}
</button>
</div>
<!--<div class="table-actions">-->
<!--<button class="btn btn-danger btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('Member/delete')}" data-subcheck="true" data-msg="您确定删除吗?">-->
<!--{:lang('DELETE')}-->
<!--</button>-->
<!--</div>-->
<ul class="pagination">{$page|default=''}</ul>
</form>
</div>
... ...