1// (function($) { 2// // é¦å å¤ä»½ä¸jqueryçajaxæ¹æ³ 3// var _ajax = $.ajax; 4// 5// // éåjqueryçajaxæ¹æ³ 6// $.ajax = function(options) { 7// // å¤ä»½optä¸erroråsuccessæ¹æ³ 8// var callback = { 9// "beforeSend" : function(XHR) { 10// }, 11// "complete" : function(XHR, TS) { 12// }, 13// "error" : function(XMLHttpRequest, textStatus, errorThrown) { 14// }, 15// "success" : function(data, textStatus) { 16// } 17// } 18// 19// // 夿忰䏿¯å¦æbeforeSendåè°å½æ° 20// if (options.beforeSend) { 21// callback.beforeSend = options.beforeSend; 22// } 23// 24// // 夿忰䏿¯å¦æcompleteåè°å½æ° 25// if (options.complete) { 26// callback.complete = options.complete; 27// } 28// 29// // 夿忰䏿¯å¦æerroråè°å½æ° 30// if (options.error) { 31// callback.error = options.error; 32// } 33// 34// // 夿忰䏿¯å¦æsuccessåè°å½æ° 35// if (options.success) { 36// callback.success = options.success; 37// } 38// 39// // æ©å±å¢å¼ºå¤ç 40// var _opt = $.extend(options, { 41// error : function(XMLHttpRequest, textStatus, errorThrown) { 42// // éè¯¯æ¹æ³å¢å¼ºå¤ç 43// callback.error(XMLHttpRequest, textStatus, errorThrown); 44// }, 45// success : function(data,textStatus) { 46// // æååè°æ¹æ³å¢å¼ºå¤ç 47// if(403==data.code){ 48// parent.location.href = '/login'; 49// } 50// callback.success(data);
51// }, 52// beforeSend : function(XHR) { 53// // æäº¤ååè°æ¹æ³ 54// var index = layer.load(1, { 55// shade: [0.1,'#fff'] //0.1éæåº¦çç½è²èæ¯ 56// }); 57// callback.beforeSend(XHR); 58// }, 59// complete : function(XHR, TS) { 60// // 请æ±å®æååè°å½æ° (è¯·æ±æåæå¤±è´¥ä¹ååè°ç¨)ã 61// layer.closeAll('loading'); 62// callback.complete(XHR, TS); 63// } 64// }); 65// 66// // è¿åéåçajax 67// return _ajax(_opt); 68// }; 69// })(jQuery); 70// 71// 72// 73// 74 75 76//å ¨ç«ajaxå è½½æç¤º 77(function ($) { 78 $(document).ajaxStart(function () { 79 var index = layer.load(1, { 80 shade: [0.1, '#fff'] //0.1éæåº¦çç½è²èæ¯ 81 }); 82 }); 83 $(document).ajaxStop(function () { 84 layer.closeAll('loading'); 85 }); 86 //ç»å½è¿æï¼shiroè¿åç»å½é¡µé¢ 87 $.ajaxSetup({ 88 complete: function (xhr, status,dataType) { 89 if('text/html;charset=UTF-8'==xhr.getResponseHeader('Content-Type')){ 90 top.location.href = '/login'; 91 } 92 } 93 }); 94})(jQuery); 95 96 97 98 99
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.