/api不生效,两三天没找到问题,最后发现vue.config.js 文件里的关键字写错了:module.exports 少写了个s,server少写了个r 。 服务器页面访问是空白页,是因为路由配置问题,没有添加“/”路由。