hotime/example/tpt/js/chunk-a2efa204.8a8a537a.js

1 line
3.1 KiB
JavaScript
Raw Normal View History

2022-03-26 08:53:40 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-a2efa204"],{1:function(t,e){},"159b":function(t,e,n){var r,a=n("da84"),i=n("fdbc"),o=n("17c2"),u=n("9112");for(r in i){var c=a[r],c=c&&c.prototype;if(c&&c.forEach!==o)try{u(c,"forEach",o)}catch(t){c.forEach=o}}},"17c2":function(t,e,n){"use strict";var r=n("b727").forEach,n=n("a640")("forEach");t.exports=n?[].forEach:function(t){return r(this,t,1<arguments.length?arguments[1]:void 0)}},2934:function(t,e,n){"use strict";n.d(e,"e",function(){return a}),n.d(e,"d",function(){return o}),n.d(e,"b",function(){return u}),n.d(e,"c",function(){return c}),n.d(e,"a",function(){return s}),n.d(e,"f",function(){return f}),n.d(e,"g",function(){return d});var e=n("b0c0"),i=n("b775"),e=n("4328"),r=n.n(e);function a(t,e){return Object(i.b)({url:t,method:"GET",params:e})}function o(t,e){return Object(i.b)({url:t,method:"GET",params:e})}function u(t,e){return Object(i.b)({url:t,method:"DELETE",data:r.a.stringify(e)})}function c(t,e){return Object(i.b)({url:t,method:"PUT",data:r.a.stringify(e)})}function s(t,e){return Object(i.b)({url:t,method:"POST",data:r.a.stringify(e)})}function f(t){var e=new FormData;return e.append("file",t,t.name),Object(i.b)({url:"file",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:e})}function d(n,r){var a=document.createElement("input");a.type="file";a.addEventListener("change",function(){var t,e=a.files[0];0!==e.size?((t=new FormData).append("file",e,e.name),t.append("org_id",n.org_id),Object(i.b)({url:"admin/company_inout/upload",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:t}).then(r)):r(null,"文件错误",a)}),a.click()}},"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]}}},a640:function(t,e,n){"use strict";var r=n("d039");t.exports=function(t,e){var n=[][t];return!!n&&r(function(){n.call(null,e||function(){throw 1},1)})}},b775:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n("d3b7"),a=n("bc3a"),r=n.n(a),a=n("4328"),i=n.n(a),o=n("7864"),u=n("56d7"),c="/";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:c,timeout:2e5});r.interceptors.request.use(function(t){return"get"===t.method&&(t.paramsSerializer=function(t){return i.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:(o.b.Message({showClose:!0,message:"登录信息丢失,请重新登陆!",type:"error",duration:2e3,offset:100}),void u.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}}]);