切换导航条
此项目
正在载入...
登录
刘朕
/
qiaohu
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
刘朕
6 years ago
提交
1a77b63ee4310c260af44410344e88c1ae0588dd
1 个父辈
776147d7
1 个管道 的构建
通过
耗费 0 秒
后台隐藏删除用户功能
变更
2
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
28 行增加
和
41 行删除
app/member/controller/MemberController.php
public/themes/admin_simpleboot3/member/member/index.html
app/member/controller/MemberController.php
查看文件 @
1a77b63
...
...
@@ -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
...
...
public/themes/admin_simpleboot3/member/member/index.html
查看文件 @
1a77b63
...
...
@@ -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>
...
...
请
注册
或
登录
后发表评论