From ec5a5a840222307d394e9938e114e613f2ca6525 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Sun, 7 Jun 2020 14:22:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BE=AE=E4=BF=A1=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- catch/wechat/Menus.php | 1 - catch/wechat/ReplyRule.php | 1 - catch/wechat/Users.php | 1 - catch/wechat/controller/Users.php | 25 +++++++++++++++++++++++++ catch/wechat/route.php | 11 +++++++++++ extend/catcher/library/WeChat.php | 10 ++++++++++ 6 files changed, 46 insertions(+), 3 deletions(-) delete mode 100644 catch/wechat/Menus.php delete mode 100644 catch/wechat/ReplyRule.php delete mode 100644 catch/wechat/Users.php create mode 100644 catch/wechat/controller/Users.php create mode 100644 catch/wechat/route.php create mode 100644 extend/catcher/library/WeChat.php diff --git a/catch/wechat/Menus.php b/catch/wechat/Menus.php deleted file mode 100644 index 6fd199e..0000000 --- a/catch/wechat/Menus.php +++ /dev/null @@ -1 +0,0 @@ - + * @copyright By CatchAdmin + * @license https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt + */ +namespace catchAdmin\wechat\controller; + +use catcher\base\CatchController; +use catcher\CatchResponse; +use catcher\library\WeChat; + +class Users extends CatchController +{ + public function index() + { + $response = WeChat::officialAccount()->base->getValidIps(); + + return CatchResponse::success($response); + } +} \ No newline at end of file diff --git a/catch/wechat/route.php b/catch/wechat/route.php new file mode 100644 index 0000000..cdebe16 --- /dev/null +++ b/catch/wechat/route.php @@ -0,0 +1,11 @@ + + * @copyright By CatchAdmin + * @license https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt + */ +$router->resource('official/users', '\catchAdmin\wechat\controller\Users'); \ No newline at end of file diff --git a/extend/catcher/library/WeChat.php b/extend/catcher/library/WeChat.php new file mode 100644 index 0000000..94bc16c --- /dev/null +++ b/extend/catcher/library/WeChat.php @@ -0,0 +1,10 @@ + + * @copyright By CatchAdmin + * @license https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt + */ \ No newline at end of file