[更新]微信关键字管理

This commit is contained in:
邹景立 2017-04-21 16:55:38 +08:00
parent 315c2da938
commit e88aac5bbb
2 changed files with 41 additions and 0 deletions

View File

@ -95,6 +95,29 @@ class Keys extends BasicAdmin {
$this->error("关键字删除失败,请稍候再试!");
}
/**
* 关键字禁用
*/
public function forbid() {
if (DataService::update($this->table)) {
$this->success("关键字禁用成功!", '');
} else {
$this->error("关键字禁用失败,请稍候再试!");
}
}
/**
* 关键字禁用
*/
public function resume() {
if (DataService::update($this->table)) {
$this->success("关键字启用成功!", '');
} else {
$this->error("关键字启用失败,请稍候再试!");
}
}
/**
* 关注默认回复
*/

View File

@ -16,6 +16,7 @@
<th class="text-center">回复类型</th>
<th class="text-center">回复内容</th>
<th class="text-center">更新时间</th>
<th class="text-center">状态</th>
<th class="text-center">操作</th>
</tr>
</thead>
@ -50,6 +51,13 @@
{/if}
</td>
<td class="text-center">{$vo.create_at}</td>
<td class='text-center'>
{if $vo.status eq 0}
<span>已禁用</span>
{elseif $vo.status eq 1}
<span style="color:#090">使用中</span>
{/if}
</td>
<td class='text-center nowrap'>
{if auth("$classuri/edit")}
@ -57,6 +65,16 @@
<a data-open='{:url("edit")}?id={$vo.id}'>编辑</a>
{/if}
{if $vo.status eq 1 and auth("$classuri/forbid")}
<span class="text-explode">|</span>
<a data-update="{$vo.id}" data-field='status' data-value='0' data-action='{:url("$classuri/forbid")}'
href="javascript:void(0)">禁用</a>
{elseif auth("$classuri/resume")}
<span class="text-explode">|</span>
<a data-update="{$vo.id}" data-field='status' data-value='1' data-action='{:url("$classuri/resume")}'
href="javascript:void(0)">启用</a>
{/if}
{if auth("$classuri/del")}
<span class="text-explode">|</span>
<a data-update="{$vo.id}" data-field='delete' data-action='{:url("del")}'