diff --git a/application/wechat/controller/Keys.php b/application/wechat/controller/Keys.php
index 3c056aabe..36654da8f 100644
--- a/application/wechat/controller/Keys.php
+++ b/application/wechat/controller/Keys.php
@@ -66,6 +66,17 @@ class Keys extends BasicAdmin {
return $this->_form($this->table, 'form', 'id');
}
+
+ protected function _form_filter($data) {
+ if ($this->request->isPost() && isset($data['keys'])) {
+ $db = Db::name($this->table)->where('keys', $data['keys']);
+ !empty($data['id']) && $db->where('id', 'neq', $data['id']);
+ if ($db->count() > 0) {
+ $this->error('关键字已经存在,请使用其它关键字!');
+ }
+ }
+ }
+
/**
* 删除关键字
*/
diff --git a/application/wechat/view/config.pay.html b/application/wechat/view/config.pay.html
index 14e5e671c..1d35f1731 100644
--- a/application/wechat/view/config.pay.html
+++ b/application/wechat/view/config.pay.html
@@ -51,7 +51,7 @@
-
-