$.ajaxSetup({ xhrFields:{ withCredentials:true, } });
header("Access-Control-Allow-Origin:http://localhost:9999");//使用cookie时此处不可用通配符header("Access-Control-Allow-Headers:X-Request-With,Content-Type");header('Access-Control-Allow-Credentials:true');//必须为true,和withCredentials:true配置对应