text: !function(e){var t={createXhrObject:function(){var e;try{e=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")}catch(t){throw new TypeError("你的浏览器不支持XHR对象")}return e},mergeOption:function(e,t){if(Object.assign)return Object.assign(e,t);for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},openRequest:function(e,t){switch(t.type){case"GET":var r="?",n=this.keys(t.data);if(0!==n.length)for(var s=0;s<datakeys.length;s++)r+=n[s]+"&"+data[n[s]];e.open("GET",t.url+r.substring(0,r.length-1)+(t.cache?"":"&date="+Date.now()),t.async);break;default:e.open(t.type,t.url,t.async)}},keys:function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)e.hasOwnProperty[r]&&t.push(r);return t},setHeader:function(e,t){var r=this.keys(t);if(r.length>0)for(var n=0;n<r.length;n++)t.hasOwnProperty(r[n])&&e.setRequestHeader(r[n],t[r[n]])}},r=function(e,r){var n={timeout:0,dataType:"",isFormdata:!1,requestHeader:{},async:!0,url:"",type:"GET",data:"",cache:!0,success:function(){},error:function(){},timeoutFunc:function(e,t){console.log(t)},contentType:"application/x-www-form-urlencoded",overrideMimeType:!1};"object"==typeof e&&(r=e,e=r.url),r.url=e,t.mergeOption(n,r),n.type=n.type.toUpperCase();var s=t.createXhrObject();t.openRequest(s,n),s.ie8=void 0===s.onload?!0:!1,s.ie8&&(s.onload=function(){this.status>=200&&this.status<300||304===this.status?n.success("json"===n.dataType?JSON.parse(s.responseText):s.responseText):n.error(s,s.statusText)}),s.onerror=function(){n.error(s,s.statusText)},n.async?s.timeoutEvent=n.timeout:null,s.overrideMimeType?s.overrideMimeType("text/javascript"):null,s.onreadystatechange=function(){switch(s.readyState){case 1:n.beforeSending&&n.beforeSending();break;case 2:n.onHeaderRecieve&&n.onHeaderRecieve();break;case 3:break;case 4:s.ie8?s.onload():s.status>=200&&s.status<300||304===s.status?n.success("json"===n.dataType?JSON.parse(s.responseText):s.responseText):n.error(s,s.statusText)}},s.ontimeout=function(e){n.timeoutFunc(n.timeout,e?e.type:"timeoutEvent"),s.abort()},s.responseType&&(s.responseType=n.dataType),t.setHeader(s,n.requestHeader),s.send(n.data||null)};r.post=function(e,t){t=t||{},t.type="POST",this(e,t)},e.ajax=r}(this);