search

Home  >  Q&A  >  body text

javascript - ajax request does not return, only returns when the page is closed. . .

最近做了一个下滑加载新数据的项目,流程是下拉到最底部调用一次AJAX获取下一页的数据,然后添加到DOM,在PC端都正常,在移动端上出现了个BUG。
下拉加载数据时,ajax请求发送到了后台,但是没有返回, success和error都收不到,服务器日志又显示是正常的,但是只要一点击刷新或关闭页面ajax就会回来(我回调里面写了alert测试)..
大家有遇到这种情况吗,网上搜了半天也没找到,求助..
滿天的星座滿天的星座2736 days ago570

reply all(1)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-06-06 09:55:17

    It is recommended to provide the code when asking questions. There are many reasons. For example, the backend code is blocked, or the ajax code is wrong, or it is related to the request method. It is also possible that there is an error in the code that handles the request, and the exception is caught without throwing it. Out,

    reply
    0
  • Cancelreply