Nodejs:npm run build之后,distindex.html页面在火狐中可以正常显示登录页面并登录成功,在Chrome中可以正常显示登录页面,登录失败
Posted 张森ZS
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Nodejs:npm run build之后,distindex.html页面在火狐中可以正常显示登录页面并登录成功,在Chrome中可以正常显示登录页面,登录失败相关的知识,希望对你有一定的参考价值。
问题描述:Nodejs:npm run build之后,distindex.html页面在火狐中可以正常显示登录页面并登录成功,在Chrome中可以正常显示登录页面,登录失败
解决方法:将打包后的distindex.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
以上是关于Nodejs:npm run build之后,distindex.html页面在火狐中可以正常显示登录页面并登录成功,在Chrome中可以正常显示登录页面,登录失败的主要内容,如果未能解决你的问题,请参考以下文章
Vue+elementUI npm run build打包之后字体 图标丢失问题