feat: 统一JWT密钥配置并修复签名验证问题

修复前端签名生成中bodyString硬编码问题
添加start-frontend.sh脚本启动前端服务
统一manage-app和gateway的JWT密钥配置
修复Repository扫描路径问题
更新测试配置和依赖
重构表名映射为sys_user和sys_role
完善用户实体类字段映射
添加集成测试配置和测试用例
This commit is contained in:
张翔
2026-04-02 12:28:49 +08:00
parent 6392c08560
commit b0f91d74f5
63 changed files with 3287 additions and 889 deletions
+67
View File
@@ -0,0 +1,67 @@
#!/usr/bin/env python3
"""
检查各个页面的实际内容
"""
from playwright.sync_api import sync_playwright
import time
pages_to_check = [
('Dashboard', 'http://localhost:3002/dashboard'),
('用户管理', 'http://localhost:3002/users'),
('角色管理', 'http://localhost:3002/roles'),
('菜单管理', 'http://localhost:3002/menus'),
('字典管理', 'http://localhost:3002/dict'),
('系统配置', 'http://localhost:3002/sys/config'),
('文件管理', 'http://localhost:3002/files'),
('通知管理', 'http://localhost:3002/notice'),
('操作日志', 'http://localhost:3002/oplog'),
('登录日志', 'http://localhost:3002/loginlog'),
]
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
page = browser.new_page()
# 登录
page.goto("http://localhost:3002/login")
page.wait_for_load_state("networkidle")
page.fill('input[placeholder="请输入用户名"]', 'admin')
page.fill('input[placeholder="请输入密码"]', 'admin123')
page.click('button:has-text("登录")')
# 等待Token
for i in range(10):
time.sleep(1)
token = page.evaluate("localStorage.getItem('token')")
if token:
break
print(f"登录成功: {token[:50] if token else 'None'}...\n")
# 检查每个页面
for name, url in pages_to_check:
print(f"检查 {name} ({url})...")
try:
page.goto(url)
page.wait_for_load_state("networkidle")
time.sleep(2)
# 检查页面内容
table_count = page.locator('table').count()
el_table_count = page.locator('.el-table').count()
body_text = page.locator('body').text_content()[:200]
print(f" URL: {page.url}")
print(f" table标签: {table_count}, .el-table: {el_table_count}")
print(f" 内容: {body_text[:100]}...")
# 截图
page.screenshot(path=f"/tmp/{name.replace('/', '_')}.png")
except Exception as e:
print(f" ❌ 错误: {e}")
print()
browser.close()