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