请选择 进入手机版 | 继续访问电脑版

fastadmin版本升级由1.0.0.20191101_beta升级到1.0.0.20191212_beta

\application\config.php下新增

//会员注册验证码类型email/mobile/wechat/text/false
 'user_register_captcha' => 'text',

\application\index\view\common\下新增\captcha.html

<!--@formatter:off-->
{if "[type]" == 'email'}
    <input type="text" name="captcha" class="form-control input-lg" data-rule="required;length(4);integer[+];remote({:url('api/validate/check_ems_correct')}, event=[event], email:#email)" />
    <span class="input-group-btn" style="padding:0;border:none;">
        <a href="javascript:;" class="btn btn-info btn-captcha btn-lg" data-url="{:url('api/ems/send')}" data-type="email" data-event="[event]">发送验证码</a>
    </span>
{elseif "[type]" == 'mobile'/}
    <input type="text" name="captcha" class="form-control input-lg" data-rule="required;length(4);integer[+];remote({:url('api/validate/check_sms_correct')}, event=[event], mobile:#mobile)" />
    <span class="input-group-btn" style="padding:0;border:none;">
        <a href="javascript:;" class="btn btn-info btn-captcha btn-lg" data-url="{:url('api/sms/send')}" data-type="mobile" data-event="[event]">发送验证码</a>
    </span>
{elseif "[type]" == 'wechat'/}
    {if get_addon_info('wechat')}
        <input type="text" name="captcha" class="form-control input-lg" data-rule="required;length(4);remote({:addon_url('wechat/captcha/check')}, event=[event])" />
        <span class="input-group-btn" style="padding:0;border:none;">
            <a href="javascript:;" class="btn btn-info btn-captcha btn-lg" data-url="{:addon_url('wechat/captcha/send')}" data-type="wechat" data-event="[event]">获取验证码</a>
        </span>
    {else/}
        请在后台插件管理中安装《<a href="https://www.fastadmin.net/store/wechat.html" target="_blank">微信管理插件</a>》
    {/if}
{elseif "[type]" == 'text' /}
    <input type="text" name="captcha" class="form-control input-lg" data-rule="required;length(4)" />
    <span class="input-group-btn" style="padding:0;border:none;">
        <img src="{:captcha_src()}" width="100" height="40" onclick="this.src = '{:captcha_src()}?r=' + Math.random();"/>
    </span>
{/if}
<!--@formatter:on-->


鲜花

握手

雷人

路过

鸡蛋
粉丝0 阅读286 回复0

精彩阅读

阅读排行榜

关注官方微信

微信号:ssucp688

QQ:1484682328

全国服务热线:

400-123-456789

(工作日:周一至周五 9:00-16:00)
www.ymscz.com
1484682328@qq.com

Archiver-手机版-小黑屋- 源码素材站

Powered by 源码素材站 2001-2021   正在备案中