Skip to content

Commit

Permalink
refactor: captcha
Browse files Browse the repository at this point in the history
  • Loading branch information
TRHX committed Dec 17, 2023
1 parent 5d5ace4 commit d9f66e4
Show file tree
Hide file tree
Showing 6 changed files with 424 additions and 194 deletions.
186 changes: 0 additions & 186 deletions docs/.vuepress/components/captcha/aliyun-v2.vue

This file was deleted.

3 changes: 3 additions & 0 deletions docs/.vuepress/components/captcha/fastyotest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,14 @@ export default {
if (data.success) {
if (data.code === 200) {
alert('登录成功!');
location.reload();
} else {
alert('登录失败,请重新验证!');
location.reload();
}
} else {
alert('登录失败,请重新验证!');
location.reload();
}
}
});
Expand Down
15 changes: 8 additions & 7 deletions docs/.vuepress/components/captcha/verify5.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ export default {
script.async = true;
document.head.appendChild(script);
$(document).ready(function () {
if(location.href.indexOf('#reloaded') == -1){
location.href = location.href + '#reloaded';
location.reload();
}
});
// $(document).ready(function () {
// if(location.href.indexOf('#reloaded') == -1){
// location.href = location.href + '#reloaded';
// location.reload();
// }
// });
$('#submit').click(function () {
let verifyId = document.getElementsByName('login-v5')[0].value;
if (!verifyId) {
return alert('请先完成验证!');
return alert('请先完成验证!');
} else {
$.ajax({
type: 'post',
Expand Down
Loading

0 comments on commit d9f66e4

Please sign in to comment.