404报错原因: 当我们设置了mode为history时,当前端发送路径给服务端时,服务端根本就不认识省去#的url,所以返回给我们404。 解决办法: 前端将路由模式改成hash调整nginx.conf配置文件