跨域方案 步骤 npm install npm run dev 配置hosts 127.0.0.1 x.stuq.com 127.0.0.1 y.stuq.com 例子是下面这几个 http://y.stuq.com/public/1.html http://y.stuq.com/public/2.html http://y.stuq.com/public/3.html http://y.stuq.com/public/4.html http://y.stuq.com/public/5.html 参考 Koa egg 浏览器同源政策及其规避方法 XMLHTTPRequest window.postMessage