使用教程在宝塔配置文件里新增 add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';即可解决跨域问题示例图 © 允许规范转载