1/* 2 * name: æ°æ®è¯·æ± 3 * param: options 4 * return: 5 */ 6function getAjaxData(options) { 7 var defaults = { 8 tplElem:null, 9 type:"get", 10 dataType:"jsonp", 11 url:null, 12 data:{}, 13 callback:null 14 }; 15 _options = $.extend({}, defaults, options); //è°ç¨ jq æ¹æ³è½¬æ¢åæ° 16 if(_options.tplElem == null){ 17 console.error('hiï¼å¿è®°IDäºï¼'); 18 return; 19 }else if(_options.url == null){ 20 console.error('hiï¼å¿è®°URLäºï¼'); 21 return; 22 } 23 $.ajax({ 24 type: _options.type, 25 dataType: _options.dataType, 26 contentType: "application/json;utf-8", 27 xhrFields:{ 28 withCredentials:true 29 }, 30 crossDomain:true, 31 url: _options.url, 32 data: _options.data, 33 beforeSend:function(XHR){ 34 $('.u-mask').show(); 35 }, 36 success: function(response){ 37 options.success && options.success(response); 38 }, 39 error: function (XMLHttpRequest, textStatus, errorThrown) { 40 options.fail && options.fail(); 41 }, 42 complete:function (XMLHttpRequest, textStatus) { 43 $('.u-mask').hide(); 44 } 45 }) 46} 47/*******è·åURLå°ååæ°********/ 48function getQueryString(name) { 49 var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); 50 var r = window.location.search.substr(1).match(reg); 51 if (r != null) return unescape(r[2]); return null; 52}
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.