文件
xionggeshop/addons/shopro_huifu/command/InstallFull.php

36 行
1.0 KiB
PHP

<?php
namespace addons\shopro_huifu\command;
use addons\shopro_huifu\library\Installer;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class InstallFull extends Command
{
protected function configure()
{
$this->setName('shopro_huifu:install')
->setAliases(['shopro_huifu:install-full'])
->setDescription('Full install: copy admin files, run SQL, create menus');
}
protected function execute(Input $input, Output $output)
{
$output->writeln('=== Shopro Huifu 一键安装 ===');
try {
Installer::run($output);
$output->writeln('');
$output->writeln('请执行 php think shopro_huifu:verify 复查');
$output->writeln('后台菜单: 系统管理 -> 商城配置 -> 汇付支付配置');
$output->writeln('直达: /admin/shopro_huifu/config');
} catch (\Throwable $e) {
$output->error($e->getMessage());
return 1;
}
return 0;
}
}