迁移站长登录验证码脚本

This commit is contained in:
2026-04-25 13:33:15 +08:00
parent c3229f870a
commit 7900145ba9
3 changed files with 42 additions and 9 deletions
+2 -9
View File
@@ -522,7 +522,7 @@
<div class="captcha-row">
<input id="captcha" name="captcha" type="text" placeholder="输入验证码" required>
<img src="/captcha/default?{{ mt_rand() }}" alt="站长登录验证码" id="captcha-img" class="captcha-image"
onclick="refreshCaptcha()" title="点击刷新验证码">
data-captcha-refresh-url="/captcha/default" title="点击刷新验证码">
</div>
</div>
@@ -552,14 +552,7 @@
</section>
</main>
<script>
/**
* 刷新验证码图片,避免浏览器缓存旧图。
*/
function refreshCaptcha() {
document.getElementById('captcha-img').src = '/captcha/default?' + Math.random();
}
</script>
@vite('resources/js/admin-login.js')
</body>
</html>