Nodejs:npm run build之后,dist\index.html页面在火狐中可以正常显示登录页面并登录成功,在Chrome中可以正常显示登录页面,登录失败

问题描述:Nodejs:npm run build之后,dist\index.html页面在火狐中可以正常显示登录页面并登录成功,在Chrome中可以正常显示登录页面,登录失败

解决方法:将打包后的dist\index.html放到http服务器上运行就可以登录了。

总结:由于Chrome不支持本地静态cookie,所以导致在Chrome中set cookie的时候失败,导致没有走到正常的登录流程。

参考:    http://lhdst-163-com.iteye.com/blog/1245110
    http://polokang.iteye.com/blog/646722
    https://blog.csdn.net/wilesen/article/details/72823269
    https://blog.csdn.net/u014477038/article/details/52330047

猜你喜欢

转载自www.cnblogs.com/zxxsteven/p/9952363.html
今日推荐