AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
## Ajax跨域访问,未携带cookie的解决办法 ajax中添加`xhrFields: {withCredentials: true},`跨域访问则会携带cookie ~~~ $.ajax({ type: "POST", url: "http://www.work.com:8040/frontend/site/code", headers: {"X-CSRF-TOKEN":"6LQjzEclDdUFKndRvHGso29BTPq6chYKgo9DG9Oz"}, data: {"name":"login"}, dataType:"json", crossDomain: true, xhrFields: {withCredentials: true}, // 携带cookie success: function(data){}, error:function(result){console.log(result);} }); ~~~