mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-12-06 10:56:55 +08:00
合并回复规则状态修改
This commit is contained in:
parent
c04364f865
commit
80aa8fdf17
@ -121,25 +121,14 @@ class Keys extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 禁用回复规则
|
* 修改回复规则状态
|
||||||
* @auth true
|
* @auth true
|
||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
*/
|
*/
|
||||||
public function forbid()
|
public function state()
|
||||||
{
|
{
|
||||||
$this->_applyFormToken();
|
$this->_applyFormToken();
|
||||||
$this->_save($this->table, ['status' => '0']);
|
$this->_save($this->table, ['status' => input('status')]);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 启用回复规则
|
|
||||||
* @auth true
|
|
||||||
* @throws \think\db\exception\DbException
|
|
||||||
*/
|
|
||||||
public function resume()
|
|
||||||
{
|
|
||||||
$this->_applyFormToken();
|
|
||||||
$this->_save($this->table, ['status' => '1']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -66,17 +66,17 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
<td class="text-left nowrap">{$vo.create_at|format_datetime}</td>
|
<td class="text-left nowrap">{$vo.create_at|format_datetime}</td>
|
||||||
<td class='text-left nowrap'>{if $vo.status eq 0}<span class="color-desc">已禁用</span>{elseif $vo.status eq 1}<span class="color-green">使用中</span>{/if}</td>
|
<td class='text-left nowrap'>{if $vo.status eq 0}<span class="color-red">已禁用</span>{elseif $vo.status eq 1}<span class="color-green">使用中</span>{/if}</td>
|
||||||
<td class='text-left nowrap'>
|
<td class='text-left nowrap'>
|
||||||
|
|
||||||
{if auth("edit")}
|
{if auth("edit")}
|
||||||
<a class="layui-btn layui-btn-sm" data-open='{:url("edit")}?id={$vo.id}'>编 辑</a>
|
<a class="layui-btn layui-btn-sm" data-open='{:url("edit")}?id={$vo.id}'>编 辑</a>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if $vo.status eq 1 and auth("forbid")}
|
{if $vo.status eq 1 and auth("state")}
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('forbid')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('forbid')}">禁 用</a>
|
<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('state')}">禁 用</a>
|
||||||
{elseif auth("resume")}
|
{elseif auth("state")}
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('resume')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('resume')}">启 用</a>
|
<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('state')}">启 用</a>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if auth("remove")}
|
{if auth("remove")}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user