feat(dependencies): update asyncmy and pandas versions for improved performance and compatibility

- Upgraded asyncmy from version 0.2.9 to 0.2.11 to leverage enhancements and bug fixes.
- Updated pandas from version 2.2.2 to 2.2.3 for better data processing capabilities.
- Added a new configuration option LOGIN_RESOLVE_IP_LOCATION to control IP location resolution during login.
- Enhanced login service to handle IP location resolution based on the new configuration.
- Improved validation logic in menu request handling to ensure proper redirection address for specific menu types.
- Adjusted CRUD template generation to dynamically use primary key column names for better flexibility.
- Updated Vue components to ensure proper handling of dynamic primary key references in menu items and forms.
This commit is contained in:
zhangtao
2026-03-29 20:33:33 +08:00
parent 25f497a55b
commit 7081850d46
19 changed files with 602 additions and 177 deletions
@@ -145,7 +145,14 @@ class LoginService:
# 若没有 X-Forwarded-For 头,则使用 request.client.host
request_ip = request.client.host if request.client else "127.0.0.1"
login_location = await IpLocalUtil.get_ip_location(request_ip)
if settings.LOGIN_RESOLVE_IP_LOCATION:
login_location = await IpLocalUtil.get_ip_location(request_ip)
else:
login_location = (
"内网IP"
if IpLocalUtil.is_private_ip(request_ip)
else "未解析(已关闭归属地查询)"
)
request.scope["login_location"] = login_location
# 确保在请求上下文中设置用户名和会话ID