iedc-go/tpt/js/chunk-2c065dd6.d9c3e429.js

1 line
2.2 KiB
JavaScript
Raw Permalink Normal View History

2022-10-30 15:44:05 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2c065dd6"],{1:function(t,e){},2934:function(t,e,n){"use strict";n.d(e,"e",function(){return o}),n.d(e,"d",function(){return a}),n.d(e,"b",function(){return s}),n.d(e,"c",function(){return u}),n.d(e,"a",function(){return c}),n.d(e,"f",function(){return d});var e=n("b0c0"),r=n("b775"),e=n("4328"),i=n.n(e);function o(t,e){return Object(r.b)({url:t,method:"GET",params:e})}function a(t,e){return Object(r.b)({url:t,method:"GET",params:e})}function s(t,e){return Object(r.b)({url:t,method:"DELETE",data:i.a.stringify(e)})}function u(t,e){return Object(r.b)({url:t,method:"PUT",data:i.a.stringify(e)})}function c(t,e){return Object(r.b)({url:t,method:"POST",data:i.a.stringify(e)})}function d(t){var e=new FormData;return e.append("file",t,t.name),Object(r.b)({url:"file",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:e})}},"83c5":function(t,e,n){"use strict";n("159b");e.a={list:{},constructor:function(){this.list={}},$on:function(t,e){this.list[t]=this.list[t]||[],this.list[t].push(e)},$emit:function(t,e){this.list[t]&&this.list[t].forEach(function(t){t(e)})},$off:function(t){this.list[t]&&delete this.list[t]}}},b775:function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n("d3b7"),i=n("bc3a"),r=n.n(i),i=n("4328"),o=n.n(i),a=n("2bea"),s=n("56d7"),u="/";r.a.defaults.withCredentials=!0,r.a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8";r=r.a.create({baseURL:u,timeout:2e4});r.interceptors.request.use(function(t){return"get"===t.method&&(t.paramsSerializer=function(t){return o.a.stringify(t,{arrayFormat:"repeat"})}),t.withCredentials=!0,t},function(t){Promise.reject(t)}),r.interceptors.response.use(function(t){return 2!==t.data.statu?t.data:(a.b.Message({showClose:!0,message:"登录信息丢失,请重新登陆!",type:"error",duration:2e3,offset:100}),void s.app.$router.push({path:"/login"}))},function(t){var e="err:"+t,n={};return t.response?n=t.response.data:(-1!=e.indexOf("timeout")?(n.code=500,n.message="请求超时,请稍后再试"):-1!=e.indexOf("Network Error")?(n.code=500,n.message="网络错误,请稍后再试"):(n.code=500,n.message=""+t),n)}),e.b=r}}]);