From 5231770babf3213196a28cbe9ac3b2dbd556b4a5 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Sun, 7 Jun 2020 14:23:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BE=AE=E4=BF=A1=E6=89=A9?= =?UTF-8?q?=E5=B1=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/catcher/library/WeChat.php | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/extend/catcher/library/WeChat.php b/extend/catcher/library/WeChat.php index 94bc16c..dd00106 100644 --- a/extend/catcher/library/WeChat.php +++ b/extend/catcher/library/WeChat.php @@ -7,4 +7,29 @@ * @author JaguarJack * @copyright By CatchAdmin * @license https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt - */ \ No newline at end of file + */ +namespace catcher\library; + +use EasyWeChat\Factory; +use think\helper\Str; + +/** + * + * @method static officialAccount() + * @method static miniProgram() + * @method static openPlatform() + * @method static work() + * @method static openWork() + * @method static payment() + * + * Class WeChat + * @package catcher\library + */ +class WeChat +{ + public static function __callStatic($name, $arguments) + { + // TODO: Implement __callStatic() method. + return Factory::{$name}(\config('wechat.'. Str::snake($name))); + } +} \ No newline at end of file