webman迁移-优化
This commit is contained in:
@@ -20,7 +20,8 @@ class AdminLog extends Model
|
||||
protected bool $updateTime = false;
|
||||
|
||||
protected string $title = '';
|
||||
protected string|array $data = '';
|
||||
/** 日志内容(勿用 $data,会与 ThinkORM Model 的 data 选项冲突) */
|
||||
protected string|array $logData = '';
|
||||
protected array $urlIgnoreRegex = [
|
||||
'/^(.*)\/(select|index|logout)$/i',
|
||||
];
|
||||
@@ -49,7 +50,7 @@ class AdminLog extends Model
|
||||
/** 设置日志内容(BuildAdmin 控制器调用) */
|
||||
public function setLogData(string|array $data): void
|
||||
{
|
||||
$this->data = $data;
|
||||
$this->logData = $data;
|
||||
}
|
||||
|
||||
public function setUrlIgnoreRegex(array|string $regex = []): void
|
||||
@@ -101,7 +102,7 @@ class AdminLog extends Model
|
||||
}
|
||||
}
|
||||
|
||||
$data = $data ?: $this->data;
|
||||
$data = $data ?: $this->logData;
|
||||
if (!$data) {
|
||||
$data = array_merge($request->get(), $request->post());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user