leaveeel

87 版本 chrome 无法登录跳转

  •  
  •   leaveeel · Dec 28, 2020 · 1268 views
    This topic created in 1982 days ago, the information mentioned may be changed or developed.

    老项目后台登录用的 ajax 请求拼接地址,获取到true后登录成功跳转到首页。现在新版 chrome 87.0.4280.88 (正式版本) ( 64 位) 登录仅刷新登录页面,控制台header返回 200,参数正确。response/preview显示failed to load resource data。在 ff 内正常跳转,61.0.x版本的 chrome 也没问题,其他版本没有测试。手动新窗口打开接口地址可以看到返回数据,回到登录页刷新成功跳转到首页

    代码:

    
    $.ajax({
    	dataType: 'jsonp',
        url: 'https://xxx/xx?callback=login&username=xxx&password=xxx',
        success: function(data){}
    })
    
    function login(result) {
    	if(result.success) {
        	window.location.href = '/'
        }else {....}
    }
    
    

    试了window.onbeforeunload确实可以在控制台看到返回数据了,但继续执行还是无法登录跳转。该如何处理这个问题

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4176 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 05:22 · PVG 13:22 · LAX 22:22 · JFK 01:22
    ♥ Do have faith in what you're doing.