From e88aac5bbb0b7e5b586b9427da06ab000ec3c20c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Fri, 21 Apr 2017 16:55:38 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E5=BE=AE=E4=BF=A1=E5=85=B3?= =?UTF-8?q?=E9=94=AE=E5=AD=97=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wechat/controller/Keys.php | 23 +++++++++++++++++++++++ application/wechat/view/keys.index.html | 18 ++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/application/wechat/controller/Keys.php b/application/wechat/controller/Keys.php index 754ae41b3..0dd397aff 100644 --- a/application/wechat/controller/Keys.php +++ b/application/wechat/controller/Keys.php @@ -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("关键字启用失败,请稍候再试!"); + } + } + /** * 关注默认回复 */ diff --git a/application/wechat/view/keys.index.html b/application/wechat/view/keys.index.html index 31dc7adce..d492e0c3b 100644 --- a/application/wechat/view/keys.index.html +++ b/application/wechat/view/keys.index.html @@ -16,6 +16,7 @@ 回复类型 回复内容 更新时间 + 状态 操作 @@ -50,6 +51,13 @@ {/if} {$vo.create_at} + + {if $vo.status eq 0} + 已禁用 + {elseif $vo.status eq 1} + 使用中 + {/if} + {if auth("$classuri/edit")} @@ -57,6 +65,16 @@ 编辑 {/if} + {if $vo.status eq 1 and auth("$classuri/forbid")} + | + 禁用 + {elseif auth("$classuri/resume")} + | + 启用 + {/if} + {if auth("$classuri/del")} |