盲盒转盘错误修改

This commit is contained in:
2026-01-07 12:28:14 +08:00
parent b46bef67df
commit d1f5dbf5e9
2 changed files with 27 additions and 3 deletions

View File

@@ -77,6 +77,7 @@ class AdminLog extends Model
}
$title = implode(' / ', $title);
}
$login_ip = request()->server('HTTP_X_REAL_IP') ?: request()->server('HTTP_X_FORWARDED_FOR') ?: request()->ip();
self::create([
'title' => $title,
'content' => !is_scalar($content) ? json_encode($content, JSON_UNESCAPED_UNICODE) : $content,
@@ -84,7 +85,7 @@ class AdminLog extends Model
'admin_id' => $admin_id,
'username' => $username,
'useragent' => substr(request()->server('HTTP_USER_AGENT'), 0, 255),
'ip' => xss_clean(strip_tags(request()->ip()))
'ip' => $login_ip//xss_clean(strip_tags(request()->ip()))
]);
}