修改wechat commands 注入方式
This commit is contained in:
parent
26e26b60a7
commit
e51cbc6850
@ -16,21 +16,17 @@ class CatchWechatService extends ModuleService
|
|||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
||||||
parent::register();
|
parent::register();
|
||||||
|
|
||||||
$this->registerCommand();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* register command
|
* register command
|
||||||
*
|
*
|
||||||
* @time 2020年06月24日
|
* @time 2020年06月24日
|
||||||
* @return void
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function registerCommand()
|
public function loadCommands()
|
||||||
{
|
{
|
||||||
$this->commands([
|
return [__NAMESPACE__, __DIR__ . DIRECTORY_SEPARATOR . 'command'];
|
||||||
SyncUsersCommand::class,
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,14 +8,11 @@
|
|||||||
* @copyright By CatchAdmin
|
* @copyright By CatchAdmin
|
||||||
* @license https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt
|
* @license https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt
|
||||||
*/
|
*/
|
||||||
namespace catcher\command\publish;
|
namespace catchAdmin\wechat\command;
|
||||||
|
|
||||||
use think\console\Command;
|
use think\console\Command;
|
||||||
use think\console\Input;
|
use think\console\Input;
|
||||||
use think\console\input\Argument;
|
|
||||||
use think\console\input\Option;
|
|
||||||
use think\console\Output;
|
use think\console\Output;
|
||||||
use catcher\CatchAdmin;
|
|
||||||
|
|
||||||
class WechatCommand extends Command
|
class WechatCommand extends Command
|
||||||
{
|
{
|
||||||
|
@ -48,4 +48,3 @@ $router->group('wechat', function () use ($router){
|
|||||||
|
|
||||||
// 消息
|
// 消息
|
||||||
$router->rule('wechat', '\catchAdmin\wechat\controller\Message@done', 'GET|POST');
|
$router->rule('wechat', '\catchAdmin\wechat\controller\Message@done', 'GET|POST');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user