fix: 改进仪表盘带宽验证 - 邮箱格式校验+数字验证码检查

Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/a13d4c74-f23c-45ce-9df9-ea5796120fbc

Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-04-08 00:24:21 +00:00 committed by GitHub
parent ac2a26ec64
commit 5749ad7ccb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -924,7 +924,7 @@ label{display:block;font-size:12px;color:var(--dim);margin-bottom:4px;font-weigh
<div class="sys-section"> <div class="sys-section">
<div class="sys-section-title">⚡ 快速入口</div> <div class="sys-section-title">⚡ 快速入口</div>
<div style="display:flex;flex-direction:column;gap:8px"> <div style="display:flex;flex-direction:column;gap:8px">
<div class="sys-team-card" style="cursor:pointer" onclick="go('system')"> <div class="sys-team-card">
<div class="sys-team-av" style="background:linear-gradient(135deg,#22d3ee,#06b6d4)">🌊</div> <div class="sys-team-av" style="background:linear-gradient(135deg,#22d3ee,#06b6d4)">🌊</div>
<div><div class="sys-team-nm">带宽共享加速池</div><div class="sys-team-role">请在用户仪表盘中操作</div></div> <div><div class="sys-team-nm">带宽共享加速池</div><div class="sys-team-role">请在用户仪表盘中操作</div></div>
</div> </div>

View File

@ -893,7 +893,7 @@ function bwSendCode() {
var btn = document.getElementById('bwSendBtn'); var btn = document.getElementById('bwSendBtn');
var result = document.getElementById('bwSendResult'); var result = document.getElementById('bwSendResult');
if (!email || email.indexOf('@') === -1) { if (!email || !/^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/.test(email)) {
result.style.display = 'block'; result.style.display = 'block';
result.style.background = '#3a1a1a'; result.style.background = '#3a1a1a';
result.style.color = '#e74c3c'; result.style.color = '#e74c3c';
@ -950,18 +950,18 @@ function bwVerifyCode() {
var btn = document.getElementById('bwVerifyBtn'); var btn = document.getElementById('bwVerifyBtn');
var result = document.getElementById('bwVerifyResult'); var result = document.getElementById('bwVerifyResult');
if (!email || email.indexOf('@') === -1) { if (!email || !/^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/.test(email)) {
result.style.display = 'block'; result.style.display = 'block';
result.style.background = '#3a1a1a'; result.style.background = '#3a1a1a';
result.style.color = '#e74c3c'; result.style.color = '#e74c3c';
result.textContent = '请先输入邮箱地址'; result.textContent = '请先输入邮箱地址';
return; return;
} }
if (!code || code.length !== 6) { if (!code || !/^[0-9]{6}$/.test(code)) {
result.style.display = 'block'; result.style.display = 'block';
result.style.background = '#3a1a1a'; result.style.background = '#3a1a1a';
result.style.color = '#e74c3c'; result.style.color = '#e74c3c';
result.textContent = '请输入6位验证码'; result.textContent = '请输入6位数字验证码';
return; return;
} }
if (!consent) { if (!consent) {