1 |
- import{m as r,E as e,n as o}from"./index.da8a37e0.js";const s="https://sso.xmnk.cn/api",a=r.create({baseURL:s,timeout:5e3});a.interceptors.request.use(function(t){return t},function(t){return Promise.reject(t)});a.interceptors.response.use(function(t){if(console.log(t,"pppp"),t.data.code===200)return Promise.resolve(t);t.data.code===505?e.warning(t.data.msg):t.data.code===401?o.push("/login"):e.error(t.data.msg)},function(t){return Promise.reject(t)});export{a};
|