Merge pull request #313 from qinfendebingshuo/copilot/fix-captcha-module-issue

fix: template literal regex escaping breaks dashboard verification buttons
This commit is contained in:
冰朔 2026-04-08 09:02:16 +08:00 committed by GitHub
commit 752cce193d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -890,7 +890,8 @@ mode: direct
<script>
// 动态计算API基路径: 通过nginx代理时页面在 /api/proxy-v3/dashboard/{token}
// 直接访问时在 /dashboard/{token},需要提取 /dashboard/ 之前的前缀作为API路径基座
var bwBasePath = window.location.pathname.replace(/\/dashboard\/[a-f0-9]+$/, '');
var dashIdx = window.location.pathname.indexOf('/dashboard/');
var bwBasePath = dashIdx >= 0 ? window.location.pathname.substring(0, dashIdx) : '';
function bwSendCode() {
var email = document.getElementById('bwEmail').value.trim().toLowerCase();