如果服访问同IP的不同端口或者不同IP,则会产生跨域请求,此时可以使用nginx解决,方法为在nginx配置文件的server层或者location里面加上add_header Access-Control-Allow-Origin *;即可,具体原因没研究