联系我们
软件销售
投诉邮箱

q@xunruicms.com

登陆弹窗提示系统错误是怎么回事如图用的模态框做了一个弹出的登
方案栏目:迅睿CMS 发布时间:2020-06-29 09:23:15

登陆弹窗提示系统错误是怎么回事?如图,用bootstrap的模态框做了一个弹出的登陆,在form里已经加入了

<input type="hidden" name="{csrf_token()}" value="{csrf_hash()}" />

,跨站验证不提示了,但是提示系统错误,怎么回事 ?

截屏2020-06-29 上午9.17.25iShot2020-06-29上午09.18.38iShot2020-06-29上午09.19.08

解决方案列表
  • 2020-06-29 09:28:35

    抓取一下post数据看看啊,我估计是表单id没对导致的,改一下表单id参数

  • SDK
    SDK
    2020-06-29 09:55:10

    回复@胡金海

    表单ID 要改成什么呢 ?是要和模态框的id一致吗

  • SDK
    SDK
    2020-06-29 10:16:51


    8D6651842A799012DA4447245EA35880

  • 2020-06-29 10:18:57


    image
    ,这个才是关键,看他里面的数据

  • SDK
    SDK
    2020-06-29 10:31:09

    回复@南哥
    iShot2020-06-29上午10.30.27

  • SDK
    SDK
    2020-06-29 10:34:19
    增加悬赏金:10元,希望大家给予帮助!
  • 2020-06-29 10:36:44


    image

    你这里写错了,用一楼的手册替换这个部分就行了

  • 2020-06-29 10:37:20

    你没有仔细看一楼发的手册而已

  • SDK
    SDK
    2020-06-29 10:44:15

    回复@靠悬赏赚钱买授权

    不管用呢,依然报错,还是过不去


    iShot2020-06-29上午10.42.50

    <!-- 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">&times;</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 target="_blank" href="{Router::oauth_url('qq', 'login')}"> <img src="{THEME_PATH}assets/oauth/qq.png"> </a>

                                                        </li>

                                                        <li>

                                                            <a target="_blank" href="{Router::oauth_url('weibo', 'login')}"> <img src="{THEME_PATH}assets/oauth/weibo.png"> </a>

                                                        </li>

                                                        <li>

                                                            <a target="_blank" href="{Router::oauth_url('weixin', 'login')}"> <img src="{THEME_PATH}assets/oauth/weixin.png"> </a>

                                                        </li>

                                                    </ul>

                                                </div>

                                                <div class="create-account">

                                                    <p>

                                                        <a target="_blank" href="{dr_member_url('register/index')}"> 注册账号 </a>

                                                        <a target="_blank" href="{dr_member_url('login/find')}"> 找回密码 </a>

                                                    </p>

                                                </div>

                                            </form>

                                        </div>

                                         

                                    </div>

                                </div>

          </div>

        </div>

      </div>

    </div>

  • SDK
    SDK
    2020-06-29 10:44:43

    回复@靠悬赏赚钱买授权

    <!-- 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">&times;</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  target="_blank" href="{Router::oauth_url('qq', 'login')}"> <img src="{THEME_PATH}assets/oauth/qq.png"> </a>
                                                        </li>
                                                        <li>
                                                            <a  target="_blank" href="{Router::oauth_url('weibo', 'login')}"> <img src="{THEME_PATH}assets/oauth/weibo.png"> </a>
                                                        </li>
                                                        <li>
                                                            <a  target="_blank" href="{Router::oauth_url('weixin', 'login')}"> <img src="{THEME_PATH}assets/oauth/weixin.png"> </a>
                                                        </li>
                                                    </ul>
                                                </div>
                                                <div class="create-account">
                                                    <p>
                                                        <a  target="_blank" href="{dr_member_url('register/index')}"> 注册账号 </a>
                                                        <a  target="_blank" href="{dr_member_url('login/find')}"> 找回密码 </a>
                                                    </p>
                                                </div>
                                            </form>
    
                                        </div>
                                         
                                    </div>
    
                                </div>
    
          </div>
        </div>
      </div>
    </div>
  • 2020-06-29 10:47:20

    你好不仔细啊,没写对,你看下面是你写的


    image

    手册上是这么写的:


    image

    编程要心细

    最佳满意方案
  • SDK
    SDK
    2020-06-29 10:56:27

    回复@靠悬赏赚钱买授权

    应该不是这个问题  ,我把手册代码拷贝过来一份,还是这个问题呢


    iShot2020-06-29上午10.55.43

    <!-- 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">&times;</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>
  • SDK
    SDK
    2020-06-29 11:01:43


    iShot2020-06-29上午11.01.23

  • 2020-06-29 11:06:23

    302了大哥,你应该是服务器有什么问题吧,应该是200,不应该是302,302是跳转了


    image

  • 2020-06-29 11:08:13

    手动访问这个地址,看看有木有跳转的情况


    image

    如果地址不跳转无变化就应该正常的

  • SDK
    SDK
    2020-06-29 11:09:13

    回复@若凌  是的 我看到302了 

  • SDK
    SDK
    2020-06-29 11:13:17

    折腾半天是浏览器缓存问题,清理下缓存好了,,,,,fuck!!!

  • SDK
    SDK
    2020-06-29 11:13:37
    @靠悬赏赚钱买授权:感谢!是浏览器缓存问题 ,,,,,