reCaptcha出现在移动设备上,而不出现在台式机/笔记本电脑上 [英] reCaptcha appears on mobile device but not on desktop/laptop
问题描述
我遇到了一个奇怪的问题.通常情况是相反的.我的Recaptcha出现在移动设备浏览器上,但没有出现在计算机上的任何浏览器中.
I have come through a weird issue. Normally it's the other way around. My recaptcha appears on mobile device browser but does not appear in any browsers on my computer.
下面是我的代码.我正在为我的网站使用angular-recaptcha.
Below is my code. I'm using angular-recaptcha for my site.
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<div vc-recaptcha ng-model="registration.recaptcha" key="'therecaptchapublickey'"></div>
</div>
</div>
</div>
下面是我的角度代码.var app = angular.module('myapp',['ui.toggle','vcRecaptcha']);
Below is my angular code. var app = angular.module('myapp',['ui.toggle','vcRecaptcha']);
app.controller('checkoutCtrl', function($scope, $http, $timeout){
if($scope.registration.recaptcha != null || $scope.registration.recaptcha != undefined){
$scope.emailmatch = 1;
console.log('recaptcha ok');
} else {
$scope.emailmatch = 0;
console.log('recaptcha invalid');
}
});
控制台上没有任何错误.Recaptcha根本不会显示在任何浏览器中.清除缓存根本没有帮助.但是验证码显示在移动设备上.
I do not get any errors on the console or anything. The recaptcha is simply not displayed in any of the browsers. Clearing cache didn't help at all. But the captcha is displayed on mobile devices.
非常感谢您的帮助.
推荐答案
事实证明,发生这种情况是因为我正在从Google加载recaptcha.js以及angular-recaptcha.js文件.好像angular-recaptcha.js加载了Recaptcha,因此删除Google recaptcha.js就可以了.
It turns out that this happens because I am loading the recaptcha.js from google as well as the angular-recaptcha.js file. Seems like the angular-recaptcha.js loads the recaptcha so removing the google recaptcha.js did the trick.
这篇关于reCaptcha出现在移动设备上,而不出现在台式机/笔记本电脑上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!