业务经理

微信扫描以上二维码

028-61286886

技术咨询

注册页面在其他页面调用时应该怎么写

开源系统 更新 2021-07-05 13:19:23 疾风

注册页面在其他页面调用时应该怎么写?

想做一个弹出层注册页面

新页面中

 {if @in_array('username', $regfield)}

这段无效,应该怎么写?



 {if @in_array('username', $regfield)}

        <div class="form-group">

            <label class="control-label visible-ie8 visible-ie9">会员名称</label>

            <input class="form-control form-control-solid placeholder-no-fix" type="text" autocomplete="off" placeholder="会员名称" name="data[username]" />

        </div>

        {/if}

        {if @in_array('phone', $regfield)}

        <div class="form-group">

            <label class="control-label visible-ie8 visible-ie9">手机号码</label>

            <input class="form-control form-control-solid placeholder-no-fix" type="text" autocomplete="off" placeholder="手机号码" name="data[phone]" />

        </div>

        {/if}

        {if @in_array('email', $regfield)}

        <div class="form-group">

            <label class="control-label visible-ie8 visible-ie9">安全邮箱</label>

            <input class="form-control form-control-solid placeholder-no-fix" type="text" autocomplete="off" placeholder="安全邮箱" name="data[email]" />

        </div>

        {/if}

        <div class="form-group">

            <label class="control-label visible-ie8 visible-ie9">登录密码</label>

            <input class="form-control form-control-solid placeholder-no-fix" type="password" autocomplete="off" placeholder="登录密码" name="data[password]" />

        </div>

        <div class="form-group">

            <label class="control-label visible-ie8 visible-ie9">确认密码</label>

            <input class="form-control form-control-solid placeholder-no-fix" type="password" autocomplete="off" placeholder="确认密码" name="data[password2]" />

        </div>

        {if $code}

        <div class="form-group">

            {if strlen(SYS_GEE_CAPTCHA_ID) > 10}

            {dr_geetest()}

            {else}

            <div class="col-sm-6" style="padding-left:0;padding-right:0">

                <input class="form-control form-control-solid placeholder-no-fix" type="text" autocomplete="off" placeholder="验证码" name="code" />

            </div>

            <div class="col-sm-6">

                <img align="absmiddle" id="dr_code_img" style="cursor:pointer;" onclick="this.src='{dr_member_url('api/captcha', array('width' => 120, 'height' => 40))}&'+Math.random();" src="{dr_member_url('api/captcha', array('width' => 120, 'height' => 40))}" />

            </div>

            {/if}

        </div>

        {/if}


方案

  • 迅睿框架创始人 #1 · 2019-07-29 11:30:51
    {if @in_array('username', $regfield)}这种判断只能在注册页面使用,其他页面就无效的 {if $code}也无效其他基本上没问题,表单按钮提交地址需要赋值注册的url
  • 疾风 #2 · 2019-07-29 11:38:40
    回复迅睿框架创始人明白你的意思,可是我想知道应该怎么写?
  • 迅睿框架创始人 #3 · 2019-07-29 11:45:08
    只能写死
  • 疾风 #4 · 2019-07-29 11:47:47
    你的意思是把if判断去掉,直接写input框?回复迅睿框架创始人
  • 疾风 #5 · 2019-07-29 11:50:17
    相信有很多用户需要弹窗登录和弹窗注册功能,希望官方可以出一个标准的写法疾风
  • 九天网络(JiuDay) #6 · 2019-07-29 14:03:25
    满意答案
  • 疾风 #7 · 2019-07-29 14:21:54
    这个教程只是登录页面的,我需要的是注册页面,而且这个页面中的验证码是写死了,也就是说,页面中写了验证码验证,后台设置是否打开验证码就无效了,同理,注册页面中,后台设置的注册名,手机号,email都无效了,都要通过前台改代码来启用关闭这些功能了。九天网络(JiuDay)
  • 疾风 #8 · 2021-07-05 13:19:23
    @九天网络(JiuDay):谢谢帮助

迅睿系统漏洞

GEO系统
GEO系统(2026-09-15)
运营客户端,防止误触阴影处关闭对话框
独立站群系统
独立站群系统(2026-09-14)
子站独立部署时修复同步附件失败问题
在线客服
在线客服(2026-09-13)
修复删除会话报错问题 删除会话时联动删除聊天图片
在线考试竞赛系统
在线考试竞赛系统(2026-09-12)
增加投票功能 考试功能拓展 注意:更新后需要执行系统更新,更新数...
网上信箱
网上信箱(2026-09-12)
修复新版本兼容问题
GeoSeo收录宝
GeoSeo收录宝(2026-09-12)
1 优化Update.php文件,解决版本在线升级不完整问题 2 ...
GeoSeo工具箱
GeoSeo工具箱(2026-09-11)
修正历史记录推送
微信系统
微信系统(2026-09-11)
增加数据统计总览界面 账号管理增加服务和公众号的区别 菜单管理支持更...
答题系统
答题系统(2026-09-11)
一站式在线答题系统,支持真题考试、题库练习和错题本,适合培训、考证、...
阿里云滑动验证码
阿里云滑动验证码(2026-09-10)
采用阿里云验证码替换迅睿系统自带的图片验证码和滑动验证码。后台设置方...