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 fcaca18 commit f766a7e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ require (
github.com/admpub/copier v0.1.1
github.com/admpub/go-ps v0.0.1
github.com/admpub/regexp2 v1.1.8
github.com/coscms/webcore v0.5.1
github.com/coscms/webcore v0.5.3
github.com/nging-plugins/caddymanager v1.7.0
github.com/nging-plugins/collector v1.7.0
github.com/nging-plugins/dbmanager v1.7.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1099,8 +1099,8 @@ github.com/coscms/oauth2s v0.4.1 h1:wt8IpmGmI/mwecKwjbdDWsGhecFJtJ2todeTdWWEg+0=
github.com/coscms/oauth2s v0.4.1/go.mod h1:O2SoVCCNeStzWkHTQ9/udvGiWI5/tKGR7x7H9rwkN0Q=
github.com/coscms/webauthn v0.3.1 h1:ycolyzptBj7d+boEvxw1JAGkgJcR8r6kVSA4wDrahNk=
github.com/coscms/webauthn v0.3.1/go.mod h1:nyMNZvFm9cArfyu6RQjrGvI+CCsl9mcC01jT4MsmByQ=
github.com/coscms/webcore v0.5.1 h1:tUb5BkvtuRNg8/1J4BSM9suSOidtWAvS8K11r/Sj3Bs=
github.com/coscms/webcore v0.5.1/go.mod h1:DIb/pvIE//YHBUvxFk+F9QPN7RVI0l0rojRz5djYsDk=
github.com/coscms/webcore v0.5.3 h1:4ZXXE85nhtZGyLEYzn7G5OnbTKEFGLXREgcYwb6Zb5o=
github.com/coscms/webcore v0.5.3/go.mod h1:DIb/pvIE//YHBUvxFk+F9QPN7RVI0l0rojRz5djYsDk=
github.com/cpu/goacmedns v0.1.1/go.mod h1:MuaouqEhPAHxsbqjgnck5zeghuwBP1dLnPoobeGqugQ=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
Expand Down
4 changes: 1 addition & 3 deletions template/backend/captcha/go/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@

{{- end -}}
{{Include "captcha/go/partial_main"}}
<script>
{{Include "captcha/go/partial_jsinit"}}
</script>
<script>window.addEventListener('load',{{Include "captcha/go/partial_jsinit"}})</script>
{{/Strip}}
8 changes: 4 additions & 4 deletions template/backend/captcha/go/partial_jsinit.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
window.addEventListener('load', function(){
function(success,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'});}
success:success||function(){App.message({text:'{{`验证成功`|$.T}}',type:'success'});},
error:error||function(){App.message({text:'{{`验证失败,请重试`|$.T}}',type:'error'});}
});
})
}

0 comments on commit f766a7e

Please sign in to comment.