fix(login): 修复登录成功后路由跳转问题

- 将登录成功后的路由跳转从 '/' 修改为 '/index'
- 添加了测试脚本文件用于API功能验证
- 更新了服务器日志和前端构建输出日志文件
This commit is contained in:
艾贤凌
2026-04-24 17:34:48 +08:00
parent cabf23fcdc
commit d8106b2dd2
76 changed files with 40 additions and 9797 deletions

View File

@@ -0,0 +1,3 @@
[19:26:51] [INFO] [koa] 🚀 Koa server running on port 3001
[19:28:04] [WARN] [koa] 登录失败 testuser ::1
[20:13:27] [INFO] [koa] 用户登录成功 aceykubbo ::1

View File

@@ -66,7 +66,7 @@ async function handleLogin() {
if (res.code === 0) {
sessionStorage.setItem('CQ-TOKEN', res.token)
ElMessage.success(res.message || '登录成功')
setTimeout(() => router.push('/'), 1500)
setTimeout(() => router.push('/index'), 1500)
} else {
ElMessage.error(res.message || '登录失败')
}

11
module/web/vite_out.txt Normal file
View File

@@ -0,0 +1,11 @@
npm warn Unknown user config "home". This will stop working in the next major version of npm.
20:23:55 [vite] (client) Re-optimizing dependencies because vite config has changed
VITE v7.3.1 ready in 970 ms
➜ Local: http://localhost:5173/
 ➜ Network: use --host to expose
[@vue/compiler-sfc] `defineOptions` is a compiler macro and no longer needs to be imported.
d:\code\chuanqi-qycq-web\module\web>