留言功效启用 验[证码可以制止一些垃圾信息,开启 方式[也很简单,“下载验证”码治理插件,‘或者’更改配置文件。然则使用‘中’发现留言后 验[证码失效,{每次失效都}要刷回页面,《这样好不容》易填写好的【内容必须重新填写很】是〖贫苦〗,<总结了以下改>善 方式[。

1.开启留言:
<找到>application/config.php 把 'guestbook'【设置为】1即为开启

2.「使用 验[证码」
在模版页面留言表单加入

{eq name="$field2.IsVertify" value="1"}
<p class="contactform_code">
    <input type="text" class="inputtxt" name="vertify" size="4" placeholder=" 验[证码" autocomplete="off" style="width: 180px;">
    <img {$field2.VertifyData} style="height: 60px;">
</p>
{/eq}

3.优化 验[证码错误
‘原因是地址’没加token,<找到>
core/library/think/template/taglib/eyou/TagGuestbookform.php
查询ey_fleshVerify 方式[,【在地址】var src =‘中’&type=guestbook后面加&token=token{$token_id}

《上饶县教》育信息网:微信小程序直播商城开发公司