问题如标题
解决方法:
接口域名,header头问题,跨域问题,nginx配置添加header信息,由于nginx配置了 location 匹配url部分字符串,所以添加header信息必须在 location /xxx/{...} 里
location /xxx/{
#...
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, DELETE, OPTIONS, PUT';
add_header 'Access-Control-Allow-Headers' 'Keep-Alive,User-Agent,X-Requested-With,Cache-Control,Cookie,X-CSRF-TOKEN,Accept,Authorization,Content-Type,api-token,language,Origin,Api-Token,token';
#...
}