Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
admpub committed Nov 14, 2024
1 parent 266246e commit 46e3673
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 67 deletions.
4 changes: 3 additions & 1 deletion template/backend/captcha/go/default.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{Strip}}
{{- if $.Data.loadResource -}}

{{- range $k, $f := $.Data.cssURLs -}}
Expand All @@ -12,4 +13,5 @@
{{Include "captcha/go/partial_main"}}
<script>
{{Include "captcha/go/partial_jsinit"}}
</script>
</script>
{{/Strip}}
28 changes: 15 additions & 13 deletions template/backend/captcha/go/partial_click.html

Large diffs are not rendered by default.

16 changes: 6 additions & 10 deletions template/backend/captcha/go/partial_jsinit.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
window.addEventListener('load', function(){
var baseURL=typeof(IS_BACKEND)!='undefined'&&IS_BACKEND?BACKEND_URL:FRONTEND_URL;
new CaptchaGo('#captchago-{{$.Data.captchaID}}',{
api:baseURL+'/captchago',idSuffix:'-{{$.Data.captchaID}}',driver:'{{$.Data.driver}}',type:'{{$.Data.type}}',
success:function(){
App.message({text:'{{`验证成功`|$.T}}',type:'success'});
},
error:function(){
App.message({text:'{{`验证失败,请重试`|$.T}}',type:'error'});
}
});
var baseURL=typeof(IS_BACKEND)!='undefined'&&IS_BACKEND?BACKEND_URL:FRONTEND_URL;
new CaptchaGo('#captchago-{{$.Data.captchaID}}',{
api:baseURL+'/captchago',idSuffix:'-{{$.Data.captchaID}}',driver:'{{$.Data.driver}}',type:'{{$.Data.type}}',
success:function(){App.message({text:'{{`验证成功`|$.T}}',type:'success'});},
error:function(){App.message({text:'{{`验证失败,请重试`|$.T}}',type:'error'});}
});
})
4 changes: 3 additions & 1 deletion template/backend/captcha/go/partial_main.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{Strip}}
<input type="hidden" name="{{$.Data.captchaName}}" id="captchago-{{$.Data.captchaID}}" value="" />
{{- if eq $.Data.driver `click` -}}
{{Include "captcha/go/partial_click"}}
Expand All @@ -11,4 +12,5 @@
{{- end -}}
{{- else -}}
{{Include "captcha/go/partial_click"}}
{{- end -}}
{{- end -}}
{{/Strip}}
29 changes: 15 additions & 14 deletions template/backend/captcha/go/partial_rotate.html

Large diffs are not rendered by default.

29 changes: 15 additions & 14 deletions template/backend/captcha/go/partial_slide_basic.html

Large diffs are not rendered by default.

29 changes: 15 additions & 14 deletions template/backend/captcha/go/partial_slide_region.html

Large diffs are not rendered by default.

0 comments on commit 46e3673

Please sign in to comment.