diff --git a/docs/superpowers/plans/2026-08-28-login-captcha-clear-watermark.md b/docs/superpowers/plans/2026-08-28-login-captcha-clear-watermark.md new file mode 100644 index 0000000..fb201a0 --- /dev/null +++ b/docs/superpowers/plans/2026-08-28-login-captcha-clear-watermark.md @@ -0,0 +1,57 @@ +# Login Captcha Clear + Watermark Cover Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans or implement inline for this tiny change. + +**Goal:** 去掉登录相关验证码输入框的 clear 按钮,并用 CSS 遮住登录背景右下角「即梦AI」水印。 + +**Architecture:** 仅改 `LoginView.vue`:四处 `t-input` 去掉 `clearable`;在 `.visual` 上加右下角遮罩伪元素。不改原图、不改后台。 + +**Tech Stack:** Vue 3 + TDesign Input、现有 LoginView scoped CSS + +**Spec:** `docs/superpowers/specs/2026-08-28-login-captcha-clear-watermark-design.md` + +--- + +### Task 1: 去掉验证码 clearable + +**Files:** +- Modify: `src/views/LoginView/LoginView.vue` + +- [ ] 移除这四处 `clearable`: + 1. `v-model="captcha"`(图形验证码) + 2. 短信登录 `smsCode`(placeholder「请输入短信验证码」) + 3. 注册 `reg.smsCode` + 4. 找回密码 `forgot.code` +- [ ] 账号/密码/手机号等其它 `clearable` 保持不动 +- [ ] Commit: `fix: 登录验证码输入框去掉清空按钮` + +### Task 2: CSS 遮罩「即梦AI」 + +**Files:** +- Modify: `src/views/LoginView/LoginView.vue` + +- [ ] 在 `.visual`(`position: relative` 已有)增加伪元素,例如: + +```css +.visual::after { + content: ''; + position: absolute; + right: 0; + bottom: 0; + width: min(280px, 28vw); + height: min(72px, 10vh); + z-index: 2; + pointer-events: none; + background: linear-gradient(135deg, transparent 20%, #102a35 55%); +} +``` + +- [ ] 确保 `.brand` / `.copy` / `.footer` 的 z-index ≥ 伪元素,文案不被挡 +- [ ] Commit: `fix: 登录背景遮住即梦AI水印` + +### Task 3: 浏览器冒烟 + +- [ ] 打开 `/login` +- [ ] 图形验证码输入有内容时无 ×;账号/密码仍有 clear +- [ ] 右下角看不到「即梦AI」 +- [ ] 必要时微调遮罩宽高后再 commit diff --git a/src/views/LoginView/LoginView.vue b/src/views/LoginView/LoginView.vue index 815f8ac..8bcb120 100644 --- a/src/views/LoginView/LoginView.vue +++ b/src/views/LoginView/LoginView.vue @@ -79,13 +79,15 @@ async function submitLogin() { const token = data?.accessToken || data?.token || data?.jToken if (!token) { loginError.value = '登录成功但未返回 token,请检查后端响应字段。' + if (method.value === 'password') await refreshCaptcha() return } userStore.setLogin(token, data.user || data.userInfo || null, data.refreshToken || '') ui.toast('登录成功') router.push('/monitor') } catch (e) { - // 错误已由拦截器提示 + // 错误已由拦截器提示;失败后换一张验证码,避免手点刷新 + if (method.value === 'password') await refreshCaptcha() } finally { loading.value = false } @@ -198,7 +200,7 @@ async function submitForgot() {