import{r as e}from"./redux-vendor-sLt0ISgd.js";import{I as t}from"./index-CZAHSLpo.js";import{a as r}from"./axios-vendor-nWFottC5.js";import{y as s}from"./antd-vendor-CEk8DAf-.js";var a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},o.apply(this,arguments)}const n=(r,s)=>e.createElement(t,o({},r,{ref:s,icon:a})),c=e.forwardRef(n);s.config({maxCount:3});const i=r.create({timeout:5e3,headers:{"Content-Type":"application/json"}});i.interceptors.request.use(e=>e,e=>Promise.reject(e)),i.interceptors.response.use(e=>{const t=e.data;if(void 0!==t.code&&0!==t.code){const e=t.message||"请求错误";return s.error(e),Promise.reject(new Error(e))}return t.data},e=>{let t="请求失败";if(e.response)switch(e.response.status){case 401:t="未授权，请重新登录";break;case 403:t="拒绝访问";break;case 404:t="请求资源不存在";break;case 500:t="服务器内部错误";break;default:t=`请求错误(${e.response.status})`}else t=e.request?"网络异常，请检查网络连接":"请求配置错误";return s.error(t),Promise.reject(e)});const p={get:(e,t)=>i.get(e,t),post:(e,t,r)=>i.post(e,t,r),put:(e,t,r)=>i.put(e,t,r),delete:(e,t)=>i.delete(e,t),patch:(e,t,r)=>i.patch(e,t,r)};export{c as R,p as h};
