迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
联系官方销售客服
1835022288
028-61286886
登陆弹窗提示系统错误是怎么回事?如图,用bootstrap的模态框做了一个弹出的登陆,在form里已经加入了
<input type="hidden" name="{csrf_token()}" value="{csrf_hash()}" />
,跨站验证不提示了,但是提示系统错误,怎么回事 ?
<!-- Button trigger modal --> <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> 登陆 </button> <!-- Modal --> <div class="modal fade" style="top:20%;" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> </div> <div class="modal-body"> <div class="portlet-body login"> <div class="row"> <div class="col-md-4"></div> <div class="col-md-8"> <form class="content" id="myform" method="post" novalidate="novalidate"> {dr_form_hidden()} {$form} <div class="form-group"> <div class="input-icon"> <i class="fa fa-user"></i> <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="账号/邮箱/手机" name="data[username]"> </div> </div> <div class="form-group"> <div class="input-icon"> <i class="fa fa-lock"></i> <input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="登录密码" name="data[password]"> </div> </div> {if $is_code} <div class="form-group"> <div class="input-group login-code"> <div class="input-icon"> <i class="fa fa-code"></i> <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="验证码" name="code"> </div> <div class="input-group-btn fc-code"> {dr_code(120, 35)} </div> </div> </div> {/if} <div class="form-actions"> <label class="rememberme mt-checkbox mt-checkbox-outline"> <input type="checkbox" name="remember" value="1"> 记住登录 <span></span> </label> <button type="button" onclick="dr_ajax_member('{dr_now_url(login/index)}', 'myform');" class="btn green pull-right"> 登录 </button> </div> <div class="login-options"> <ul class="login-oauth"> <li> <a href="{Router::oauth_url('qq', 'login')}"> <img src="{THEME_PATH}assets/oauth/qq.png"> </a> </li> <li> <a href="{Router::oauth_url('weibo', 'login')}"> <img src="{THEME_PATH}assets/oauth/weibo.png"> </a> </li> <li> <a href="{Router::oauth_url('weixin', 'login')}"> <img src="{THEME_PATH}assets/oauth/weixin.png"> </a> </li> </ul> </div> <div class="create-account"> <p> <a href="{dr_member_url('register/index')}"> 注册账号 </a> <a href="{dr_member_url('login/find')}"> 找回密码 </a> </p> </div> </form> </div> </div> </div> </div> </div> </div> </div>
<!-- Button trigger modal --> <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> 登陆 </button> <!-- Modal --> <div class="modal fade" style="top:20%;" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> </div> <div class="modal-body"> <form class="content" id="loginform" method="post" novalidate="novalidate"> {dr_form_hidden()} <div class="form-group"> <div class="input-icon"> <i class="fa fa-user"></i> <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="账号/邮箱/手机" name="data[username]"> </div> </div> <div class="form-group"> <div class="input-icon"> <i class="fa fa-lock"></i> <input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="登录密码" name="data[password]"> </div> </div> {if $ci->member_cache['login']['code']} <div class="form-group"> <div class="input-group login-code"> <div class="input-icon"> <i class="fa fa-code"></i> <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="验证码" name="code"> </div> <div class="input-group-btn fc-code"> {dr_code(120, 35)} </div> </div> </div> {/if} <div class="form-actions"> <label class="rememberme mt-checkbox mt-checkbox-outline"> <input type="checkbox" name="remember" value="1"> 记住登录 <span></span> </label> <button type="button" onclick="dr_ajax_member('{dr_member_url('login/index')}', 'loginform');" class="btn green pull-right"> 登录 </button> </div> </form> </div> </div> </div> </div>
,这个才是关键,看他里面的数据
你这里写错了,用一楼的手册替换这个部分就行了
<!-- Button trigger modal --><button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> 登陆</button> <!-- Modal --><div class="modal fade" style="top:20%;" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> </div> <div class="modal-body"> <div class="portlet-body login"> <div class="row"> <div class="col-md-4"></div> <div class="col-md-8"> <form class="content" id="myform" method="post" novalidate="novalidate"> {dr_form_hidden()} {$form} <div class="form-group"> <div class="input-icon"> <i class="fa fa-user"></i> <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="账号/邮箱/手机" name="data[username]"> </div> </div> <div class="form-group"> <div class="input-icon"> <i class="fa fa-lock"></i> <input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="登录密码" name="data[password]"> </div> </div> {if $is_code} <div class="form-group"> <div class="input-group login-code"> <div class="input-icon"> <i class="fa fa-code"></i> <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="验证码" name="code"> </div> <div class="input-group-btn fc-code"> {dr_code(120, 35)} </div> </div> </div> {/if} <div class="form-actions"> <label class="rememberme mt-checkbox mt-checkbox-outline"> <input type="checkbox" name="remember" value="1"> 记住登录 <span></span> </label> <button type="button" onclick="dr_ajax_member('{dr_now_url(login/index)}', 'myform');" class="btn green pull-right"> 登录 </button> </div> <div class="login-options"> <ul class="login-oauth"> <li> <a href="{Router::oauth_url('qq', 'login')}"> <img src="{THEME_PATH}assets/oauth/qq.png"> </a> </li> <li> <a href="{Router::oauth_url('weibo', 'login')}"> <img src="{THEME_PATH}assets/oauth/weibo.png"> </a> </li> <li> <a href="{Router::oauth_url('weixin', 'login')}"> <img src="{THEME_PATH}assets/oauth/weixin.png"> </a> </li> </ul> </div> <div class="create-account"> <p> <a href="{dr_member_url('register/index')}"> 注册账号 </a> <a href="{dr_member_url('login/find')}"> 找回密码 </a> </p> </div> </form> </div> </div> </div> </div> </div> </div></div>
手册上是这么写的:
编程要心细
如果地址不跳转无变化就应该正常的