File: /www/wwwroot//crm.jmfdbn.com/addons/vaptcha/vaptcha.html
<style>
.vaptcha-container {width: 100%; height: 36px; line-height: 36px; text-align: center; }
.vaptcha-init-main {display: table; width: 100%; height: 100%; background-color: #EEEEEE; }
.vaptcha-init-loading {display: table-cell; vertical-align: middle; text-align: center }
.vaptcha-init-loading>a {display: inline-block; width: 18px; height: 18px; border: none; }
.vaptcha-init-loading>a img {width: auto !important;vertical-align: middle;height: auto !important;}
.vaptcha-init-loading .vaptcha-text {font-family: sans-serif; font-size: 12px; color: #bbb; vertical-align: middle }
</style>
<script src="https://v.vaptcha.com/v3.js"></script>
<script>
$(document).ready(function() {
$(".verify-box").html('<input type="hidden" name="verify" class="form-control" /><div class="layui-input-inline input-item"><div class="vaptcha-container" id="vaptchaContainer"><div class="vaptcha-init-main"><div class="vaptcha-init-loading"><a href="/" target="_blank"><img src="https://cdn.vaptcha.com/vaptcha-loading.gif" /></a><span class="vaptcha-text">Vaptcha启动中...</span></div></div></div></div>');
vaptcha({
vid: '{$config.appvid}', //验证单元id
type: 'click', //显示类型 点击式
https: false, //使用https 默认 true
container: '#vaptchaContainer',
scene: 1, //场景值 不填默认为0
offline_server: '{:url("addons/vaptcha/init")}',
//可选参数
mode: 'offline' // 离线模式时使用
}).then(function(obj) {
obj.renderTokenInput('.layui-form');
obj.render();
$('input[name="verify"]').val('ok');
$('.layui-form').on("error.form", function (e, data) {
obj.reset();
});
})
})
</script>