更新
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminapi\controller\crawler;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\crawler\TaskLogLists;
|
||||
use app\common\model\CrawlerTaskLog;
|
||||
|
||||
class TaskLogController extends BaseAdminController
|
||||
{
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new TaskLogLists());
|
||||
}
|
||||
|
||||
public function detail()
|
||||
{
|
||||
$id = $this->request->get('id/d', 0);
|
||||
$log = CrawlerTaskLog::findOrEmpty($id);
|
||||
if ($log->isEmpty()) {
|
||||
return $this->fail('日志不存在');
|
||||
}
|
||||
return $this->data(TaskLogLists::formatItem($log->toArray()));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user