
管理员
站长
- UID
- 1
- 积分
- 224398
- 余额
- 13 R
- Moe币
- 84879
- 在线时间
- 279 小时
- 注册时间
- 2025-12-28
- 最后登录
- 2026-11-6
|
|
ORTED,f,U)),U=null)},U.onerror=function(){g(new ct("Network Error",ct.ERR_NETWORK,f,U)),U=null},U.ontimeout=function(){var Re=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded";g(new ct(Re,f,U)),U=null},"setRequestHeader"in U&&Me.forEach(H,function(Re,Ge){U.setRequestHeader(Ge,Re)}),Me.isUndefined(f.withCredentials)||(U.withCredentials=!!f.withCredentials),X&&X!=="json"&&(U.responseType=f.responseType),U.send(Z||null)})},_r={adapter:["xhr","http"],timeout:2e4,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,withCredentials:!0,responseType:"json",validateStatus:function(f){return f>=200&&f<300},headers:{Accept:"application/json, text/plain, */*"}},Cn=function(){function f(){s(this,f),this.defaults=_r}return l(f,[{key:"request",value:function(v,g){var m;typeof v=="string"?(g=g||{}).url=v:g=v||{},(g=Me.mergeConfig(this.defaults,g)).method=(g.method||this.defaults.method||"get").toLowerCase();try{m=nn(g)}catch(O){return Promise.reject(O)}return m}}]),f}();Me.forEach(["delete","get","head","options"],function(f){Cn.prototype[f]=function(v,g){return this.request(Me.mergeConfig(g||{},{method:f,url:v,data:(g||{}).data}))}}),Me.forEach(["post","put","patch"],function(f){Cn.prototype[f]=function(v,g,m){return this.request(Me.mergeConfig(m||{},{method:f,headers:{"Content-Type":"application/json"},url:v,data:JSON.stringify(g)}))}});var h,_,x=new Cn,S={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn",LOG:"log"},R=function(){function f(v){s(this,f),this.level=v||S.INFO}return l(f,[{key:"log",value:function(v){this.shouldLog(v)}},{key:"shouldLog",value:function(v){var g=Object.values(S);return g.indexOf(v)>=g.indexOf(this.level)}},{key:"debug",value:function(){for(var v=arguments.length,g=new Array(v),m=0;m<v;m++)g[m]=arguments[m];this.log.apply(this,[S.DEB |
|