1. 程式人生 > >Nodejs:npm run build之後,distindex.html頁面在火狐中可以正常顯示登錄頁面並登錄成功,在Chrome中可以正常顯示登錄頁面,登錄失敗

Nodejs:npm run build之後,distindex.html頁面在火狐中可以正常顯示登錄頁面並登錄成功,在Chrome中可以正常顯示登錄頁面,登錄失敗

服務 index set npm 解決方法 本地 流程 html csdn

問題描述: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

Nodejs:npm run build之後,dist\index.html頁面在火狐中可以正常顯示登錄頁面並登錄成功,在Chrome中可以正常顯示登錄頁面,登錄失敗