From 94e0d06744aa78a5a8c7d76c8111d0d169708743 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Fri, 27 Dec 2019 09:37:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4LogicTrait?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/crmeb/traits/LogicTrait.php | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/crmeb/crmeb/traits/LogicTrait.php b/crmeb/crmeb/traits/LogicTrait.php index c818d4c4..23023df0 100644 --- a/crmeb/crmeb/traits/LogicTrait.php +++ b/crmeb/crmeb/traits/LogicTrait.php @@ -23,17 +23,6 @@ trait LogicTrait */ protected static $instance; - /** - * 静态方法调用 - * @param $method 调用方法 - * @param $params 参数 - * @return mixed - */ - public static function __callStatic($method, $params) - { - return call_user_func_array([self::$instance, $method], $params); - } - /** * 配置参数 * @param array $config @@ -171,8 +160,12 @@ trait LogicTrait return $this; } } else if (in_array($method, $keys)) { - $this->sendType = $method; - return $this; + if (property_exists($this, 'handleType') && array_shift($ages) !== true) { + $this->handleType = $method; + return $this; + } else { + return $this->{$method}; + } } else { throw new AuthException('Method does not exist:' . $method); }