Files
ClassContent/历届学生/front-end-team/项目练习/上课项目/在包河vue/dist/static/js/app.6e6788fd2faa91301a54.js
2024-09-27 02:06:13 +08:00

1 line
3.1 KiB
JavaScript

webpackJsonp([3],{NHnr:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});e("/JRm");var r=e("yf3K"),a={render:function(){var t=this.$createElement,n=this._self._c||t;return n("div",{attrs:{id:"app"}},[n("router-view")],1)},staticRenderFns:[]};var u=e("C7Lr")({name:"App"},a,!1,function(t){e("t5PT")},null,null).exports,s=e("ddSS");r.a.use(s.a);var i=new s.a({routes:[{path:"/",name:"home",component:function(){return e.e(0).then(e.bind(null,"lyB/"))}},{path:"/about",name:"about",component:function(){return e.e(1).then(e.bind(null,"wp6V"))}}]}),o=e("BdEu"),c=(e("TdPg"),e("lC5x")),p=e.n(c),l=e("J0Oq"),f=e.n(l),h=e("AA3o"),d=e.n(h),v=e("xSur"),m=e.n(v),g=e("rVsN"),w=e.n(g),x=e("DoAe"),y=e.n(x),b=function(){function t(){d()(this,t),this.instance=y.a.create({baseURL:U.checkBaseUrl(),timeout:3e3,headers:{}}),this.interceptors()}return m()(t,[{key:"get",value:function(){var t=f()(p.a.mark(function t(n){return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.instance.get(n.url,{params:n.data});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)}));return function(n){return t.apply(this,arguments)}}()},{key:"post",value:function(){var t=f()(p.a.mark(function t(n){return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.instance.post(n.url,n.data);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)}));return function(n){return t.apply(this,arguments)}}()},{key:"interceptors",value:function(){this.instance.interceptors.request.use(function(t){return o.a.loading({message:"加载中...",duration:0}),t},function(t){return w.a.reject(t)}),this.instance.interceptors.response.use(function(t){switch(o.a.clear(),t.data.status){case 200:return t.data.result;case 500:throw o.a.loading({type:"fail",message:t.data.msg}),new Error(t.data.msg)}},function(t){return w.a.reject(t)})}}]),t}(),k=function t(){d()(this,t)},P={index:new(function(){function t(){d()(this,t)}return m()(t,[{key:"home",value:function(){var t=f()(p.a.mark(function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(new b).get({url:U.urlList.index,data:n});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}()),car:new k},B=new(function(){function t(){d()(this,t)}return m()(t,[{key:"test",value:function(){console.log("test")}}]),t}()),U={devBaseUrl:"http://192.168.31.100:3000/api/json",testBaseUrl:"http://192.168.31.100:3000/api/json/test",prodBaseUrl:"http://192.168.31.100:3000/api/json/prod",urlList:{index:"/index"},vuePlugins:[o.b],noVuePlugins:[{name:"$http",value:P},{name:"$utils",value:B}],checkBaseUrl:function(){return this.prodBaseUrl}};r.a.config.productionTip=!1,U.vuePlugins.forEach(function(t){return r.a.use(t)}),U.noVuePlugins.forEach(function(t){return r.a.prototype[t.name]=t.value}),new r.a({el:"#app",router:i,components:{App:u},template:"<App/>"})},TdPg:function(t,n){},t5PT:function(t,n){}},["NHnr"]);