优化定时器的防刷机制;

This commit is contained in:
augushong
2022-02-28 22:20:10 +08:00
parent 0f0a1a72af
commit 0e17a2d9a5
3 changed files with 64 additions and 9 deletions

View File

@@ -4,13 +4,21 @@ declare(strict_types=1);
namespace app\tools\controller\timer;
use app\common\controller\ToolsController;
use app\common\controller\TimerController;
use think\facade\Console;
class ResetPassword extends ToolsController
class ResetPassword extends TimerController
{
protected $frequency = 600;
public function do()
{
if (!env('adminsystem.is_demo', false)) {
return $this->error('本功能只有在演示环境下在能使用', '', '/');
}
$output = Console::call('admin:resetPassword', [
'--password=123456'
]);