Skip to content

Commit

Permalink
fix: cloudflare turnstile managed demo
Browse files Browse the repository at this point in the history
  • Loading branch information
TRHX committed Feb 3, 2024
1 parent df1f12d commit ebb0740
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions docs/.vuepress/components/captcha/turnstile-managed-challenge.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
<template>
<div style="text-align: center">
<h1>Cloudflare Turnstile Demo <Badge text="Managed Challenge" type="tip" vertical="top"/></h1>
<form id="form">
<br>
<div>
<input type="text" :placeholder="'\ue614 请输入账号'" id="username" maxlength="" class="iconfont cf-input">
</div>
<br>
<div>
<input type="text" :placeholder="'\ue69c 请输入密码'" id="password" maxlength="" class="iconfont cf-input">
</div>
<br>
<div id="cf-captcha">
<p id="cf-wait" class="cf-show">正在加载验证码......<br>(若长时间未加载,请刷新网页并科学访问)</p>
</div>
<br>
<input class="cf-submit2" id="submit" type="submit" value="立即登录">
</form>
<br>
<div>
<input type="text" :placeholder="'\ue614 请输入账号'" id="username" maxlength="" class="iconfont cf-input">
</div>
<br>
<div>
<input type="text" :placeholder="'\ue69c 请输入密码'" id="password" maxlength="" class="iconfont cf-input">
</div>
<br>
<div id="cf-captcha">
<p id="cf-wait" class="cf-show">正在加载验证码......<br>(若长时间未加载,请刷新网页并科学访问)</p>
</div>
<br>
<input class="cf-submit2" id="submit" type="submit" value="立即登录">
</div>
</template>
<script>
Expand Down Expand Up @@ -55,9 +53,8 @@ export default {
dataType: 'json',
data: result,
success: function (data) {
if (data.result === 'success') {
if (data.status === 'success') {
alert('登录成功!');
location.reload();
} else if (data.result === 'fail') {
alert('登录失败,请重新验证!');
}
Expand Down

0 comments on commit ebb0740

Please sign in to comment.