fix(#606): 【验证失败反馈】Bug #606 上次修复未通过全链路验证,请根据以下失败原因重新修复:

失败原因:
- Playwright 回归测试(@bug606) :     Error: expect(page).not.toHaveURL(expected) failed;         23 × unexpected value "http://localhost:81/login?redirect=/index";     > 27 |     await expect(page).not.toHaveURL(/.*login.*/);;       30 |     const jsErrors: string[] = [];;     test-results/bug-606-🐛-Bug-606-606-请修复-68c8e-、频次、执行时间)-bug606-regression-chromium/test-failed-1.png

总耗时: 177087ms

请针对上述失败项重新修复,确保:
1. 编译通过(vite build / mvn compile)
2. 单元测试通过(vitest / mvn test)
3. Playwright 回归测试通过
4. 数据库表可访问
5. 后端服务可达

根因:
- "审查 Bug #606 修复代码,定位测试失败根因"}
- 审查 Bug #606 修复代码,定位测试失败根因
- · Let me start by
- ·  investigating
- ·  the code
- · base
- ·  to
- ·  understand what
- ·  Bug #60
- · 6 is about.
- ⏵ run_shell {"command":"cd /home/user/repos/HealthLink-HIS && git log --oneline -20"}
- ⚠️ MODERATE risk command
- Exit code: 2
- /bin/sh: 1: cd: can't cd to /home/user/repos/HealthLink-HIS
- ⏵ run_shell {"command":"cd /home/user/repos/HealthLink-HIS && git diff HEAD~1 --stat"}
- ⚠️ MODERATE risk command
- Exit code: 2
- /bin/sh: 1: cd: can't cd to /home/user/repos/HealthLink-HIS
- ⏵ search_text {"pattern":"bug.?606|Bug.?606|BUG.?606","path":"MD"}
- No matches
- · Let me find the
- ·  correct project
- ·  root
- ⏵ run_shell {"command":"pwd && ls"}
- Exit code: 0
- /tmp/agentforge-worktrees/guanyu
- AGENTS.md
- deploy
- healthlink-his-server
- healthlink-his-ui
- package.json
- package-lock.json
- pom.xml
- RULES.md
- scripts
- zentao_api_example.py
- zentao_api.sh
- · Let
- ·  me start
- ·  by understanding the bug
- ·  and the current
- ·  state of the code
- · base
- ⏵ run_shell {"command":"git log --oneline -20"}
- Exit code: 0

修复:
- 请修复 Bug #726(重试)
- 【验证失败反馈】Bug #681 上次修复未通过全链路验证,请根据以下失败原因重新修复:
- 请修复 Bug #742:收费工作站住院登记数据库报错
- 请修复 Bug #742:收费工作站住院登记数据库报错
- 请修复 Bug #725:绿色通道激活报错
- 请修复 Bug #678:诊断录入诊断类别无法选择
- 请修复 Bug #653:医嘱录入给药途径下拉冗余编码
- 请修复 Bug #757:中医诊断无法新增
- 【验证失败反馈】Bug #638 上次修复未通过全链路验证,请根据以下失败原因重新修复:
- da0bb81fd fix(#665): guanyu (降级合入)
- 4bef2498b fix(#644): zhaoyun (降级合入)
- d12cde14b fix(#745): guanyu (文件合入)
- 226d3192f fix(#743): guanyu (文件合入)
- b063a2fb2 fix(#735): guanyu (文件合入)
- 4a72fceec fix(#733): guanyu (文件合入)
- 87bc7e166 fix(#721): guanyu (文件合入)
- fb7116cfe fix(#682): guanyu (文件合入)
- 3eeb9445f fix(#672): guanyu (文件合入)
- 8c6eb1efd fix(#672): guanyu (文件合入)
- 7da7ec80a fix(#668): guanyu (文件合入)
- ⏵ run_shell {"command":"git diff HEAD~1 --stat"}
- Exit code: 0
- MD/MODULE_INDEX.md                                            |  2 +-
- .../his/web/pathology/controller/PathologyController.java     |  6 ++++++
- healthlink-his-ui/src/store/modules/app.js                    |  8 ++++----
- healthlink-his-ui/src/utils/auth.js                           |  4 ++--
- healthlink-his-ui/src/views/login.vue                         | 11 ++++++-----
- 5 files changed, 19 insertions(+), 12 deletions(-)
- ⏵ run_shell {"command":"git diff HEAD~1 --name-only"}
- Exit code: 0
- MD/MODULE_INDEX.md
- healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pathology/controller/PathologyController.java
- healthlink-his-ui/src/store/modules/app.js
- healthlink-his-ui/src/utils/auth.js
- healthlink-his-ui/src/views/login.vue
- API request failed (429): {
- "error": {
- "code": "429",
- "message": "Too many requests",
- "type": "limitation"
- Test ---
- MiMo Code CLI
- model=mimo-v2.5 format=anthropic baseUrl=https://token-plan-cn.xiaomimimo.com
- workspace=/tmp/agentforge-worktrees/guanyu
- API request failed (429): {
- "error": {
- "code": "429",
- "message": "Too many requests",
- "type": "limitation"
- Verify ---
- 好,磁盘上的文件已包含 `{ path: '/' }` 的修改。但测试仍然失败——登录后仍被重定向到登录页。让我深入分析登录流程。
This commit is contained in:
2026-06-15 08:17:38 +08:00
parent 43e87c3e8f
commit dcd68e040f
3 changed files with 12 additions and 11 deletions

View File

@@ -20,13 +20,13 @@ const useAppStore = defineStore(
this.sidebar.opened = !this.sidebar.opened
this.sidebar.withoutAnimation = withoutAnimation
if (this.sidebar.opened) {
Cookies.set('sidebarStatus', 1)
Cookies.set('sidebarStatus', 1, { path: '/' })
} else {
Cookies.set('sidebarStatus', 0)
Cookies.set('sidebarStatus', 0, { path: '/' })
}
},
closeSideBar({ withoutAnimation }) {
Cookies.set('sidebarStatus', 0)
Cookies.set('sidebarStatus', 0, { path: '/' })
this.sidebar.opened = false
this.sidebar.withoutAnimation = withoutAnimation
},
@@ -35,7 +35,7 @@ const useAppStore = defineStore(
},
setSize(size) {
this.size = size;
Cookies.set('size', size)
Cookies.set('size', size, { path: '/' })
},
toggleSideBarHide(status) {
this.sidebar.hide = status

View File

@@ -7,9 +7,9 @@ export function getToken() {
}
export function setToken(token) {
return Cookies.set(TokenKey, token)
return Cookies.set(TokenKey, token, { path: '/' })
}
export function removeToken() {
return Cookies.remove(TokenKey)
return Cookies.remove(TokenKey, { path: '/' })
}

View File

@@ -321,16 +321,17 @@ function handleLogin() {
loading.value = true;
// 勾选了需要记住密码设置在 cookie 中设置记住用户名和密码
if (loginForm.value.rememberMe) {
Cookies.set('username', loginForm.value.username, { expires: 30 });
Cookies.set('username', loginForm.value.username, { expires: 30, path: '/' });
Cookies.set('password', encrypt(loginForm.value.password), {
expires: 30,
path: '/',
});
Cookies.set('rememberMe', loginForm.value.rememberMe, { expires: 30 });
Cookies.set('rememberMe', loginForm.value.rememberMe, { expires: 30, path: '/' });
} else {
// 否则移除
Cookies.remove('username');
Cookies.remove('password');
Cookies.remove('rememberMe');
Cookies.remove('username', { path: '/' });
Cookies.remove('password', { path: '/' });
Cookies.remove('rememberMe', { path: '/' });
}
// 调用action的登录方法
userStore