1
This commit is contained in:
@ -110,6 +110,22 @@ class Order extends AdminController
|
||||
$save ? $this->success('IP拉黑成功') : $this->error('保存失败');
|
||||
}
|
||||
}
|
||||
#[NodeAnnotation(title: '开始操作', auth: true)]
|
||||
public function start_url(Request $request, $id): string
|
||||
{
|
||||
$row = self::$model::find($id);
|
||||
empty($row) && $this->error('数据不存在');
|
||||
if ($request->isPost()) {
|
||||
try {
|
||||
$save = (new \app\admin\model\BlackIp())->save([
|
||||
'type' => $row->type == 1?0:1,
|
||||
]);
|
||||
}catch (\Exception $e) {
|
||||
$this->error('保存失败');
|
||||
}
|
||||
$save ? $this->success('IP拉黑成功') : $this->error('保存失败');
|
||||
}
|
||||
}
|
||||
|
||||
#[MiddlewareAnnotation(ignore: MiddlewareAnnotation::IGNORE_LOGIN)]
|
||||
public function no_check_login(Request $request): string
|
||||
|
||||
Reference in New Issue
Block a user