下面是一次风险监控的过程:
1、模拟当前为新闻列表。
2、前台接入KgCaptcha
<script src="captcha.js?appid=xxx"></script>
<script type="text/javascript">
kg.captcha({
// 绑定弹窗按钮
button: "#captchaButton",
// 验证成功事务处理
success: function (e) {
// 验证成功,直接提交表单
console.log(e);
document.cookie = "sNum=1";
document.cookie = "sTime="+Math.round(new Date().getTime()/1000);
document.getElementById('kgCaptchaToken').value = e['token']
form1.submit();
},
// 验证失败事务处理
failure: function (e) {
console.log(e);
},
// 点击刷新按钮时触发
refresh: function (e) {
console.log(e);
}
</script>
<a id="captchaButton" style="display: none;">点击弹出验证窗口</a>
<form method="post" id="form1" name="form1">
<input type="hidden" name="action" value="captcha" />
<input type="hidden" name="kgCaptchaToken" id="kgCaptchaToken" value="" />
</form>
1、模拟当前为新闻列表。
2、前台接入KgCaptcha
<script src="captcha.js?appid=xxx"></script>
<script type="text/javascript">
kg.captcha({
// 绑定弹窗按钮
button: "#captchaButton",
// 验证成功事务处理
success: function (e) {
// 验证成功,直接提交表单
console.log(e);
document.cookie = "sNum=1";
document.cookie = "sTime="+Math.round(new Date().getTime()/1000);
document.getElementById('kgCaptchaToken').value = e['token']
form1.submit();
},
// 验证失败事务处理
failure: function (e) {
console.log(e);
},
// 点击刷新按钮时触发
refresh: function (e) {
console.log(e);
}
</script>
<a id="captchaButton" style="display: none;">点击弹出验证窗口</a>
<form method="post" id="form1" name="form1">
<input type="hidden" name="action" value="captcha" />
<input type="hidden" name="kgCaptchaToken" id="kgCaptchaToken" value="" />
</form>