在页面加上这个,重写annie.ajax即可
annie.ajax = function ajax(info) {
var urlLoader = new annie.URLLoader();
// urlLoader.addHeader("X-Requested-With", "XMLHttpRequest");
urlLoader.method = info.type == undefined ? "get" : info.type;
urlLoader.data = info.data == undefined ? null : info.data;
urlLoader.responseType = info.responseType == undefined ? "text" : info.responseType;
if (info.success != undefined) {
urlLoader.addEventListener(annie.Event.COMPLETE, info.success);
}
if (info.error != undefined) {
urlLoader.addEventListener(annie.Event.ERROR, info.error);
}
urlLoader.load(info.url);
}
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!