(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5e9a2939","chunk-5e9a2939"],{2423:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return c}));var r=n("b775");function o(e){return Object(r["a"])({url:"/vue-element-admin/article/pv",method:"get",params:{pv:e}})}function a(e){return Object(r["a"])({url:"/vue-element-admin/article/create",method:"post",data:e})}function c(e){return Object(r["a"])({url:"/vue-element-admin/article/update",method:"post",data:e})}},b775:function(e,t,n){"use strict";var r=n("cee4"),o=n("5c96"),a=n("4360"),c=n("5f87"),u=r["a"].create({baseURL:"http://6e75307b651c.ngrok.io/api/",timeout:5e4});u.interceptors.request.use((function(e){return a["a"].getters.token&&(e.headers["X-Token"]=Object(c["a"])()),e}),(function(e){return console.log(e),Promise.reject(e)})),u.interceptors.response.use((function(e){var t=e.data;return 2e4!==t.code?(Object(o["Message"])({message:t.message||"Error",type:"error",duration:5e3}),50008!==t.code&&50012!==t.code&&50014!==t.code||o["MessageBox"].confirm("You have been logged out, you can cancel to stay on this page, or log in again","Confirm logout",{confirmButtonText:"Re-Login",cancelButtonText:"Cancel",type:"warning"}).then((function(){a["a"].dispatch("user/resetToken").then((function(){location.reload()}))})),Promise.reject(new Error(t.message||"Error"))):t}),(function(e){return console.log("err"+e),Object(o["Message"])({message:e.message,type:"error",duration:5e3}),Promise.reject(e)})),t["a"]=u}}]);