步骤: 1.在vscode中设置转发的配置 baseUri为代理时的location proxyUri为要请求要代理的地址 2.重启live-server服务器 关闭之后重新打开,html中的跨域请求就可以正常转发了