39990220065179d7080692a029ab463966a8cdd4.svn-base 3.6 KB

12
  1. webpackJsonp([8],{NHnr:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n("HsqT"),o={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("router-view")],1)},staticRenderFns:[]};var r=n("C7Lr")({name:"App"},o,!1,function(t){n("Wogf")},null,null).exports,i=n("KGCO");a.default.use(i.a);var l=new i.a({routes:[{path:"/",name:"StHome",component:function(){return Promise.all([n.e(0),n.e(1)]).then(n.bind(null,"0ynV"))}},{path:"/AllMatch",name:"AllMatch",component:function(){return Promise.all([n.e(0),n.e(3)]).then(n.bind(null,"zzjx"))}},{path:"/StRollBallpage",name:"RollBallpage",component:function(){return Promise.all([n.e(0),n.e(2)]).then(n.bind(null,"N+Ds"))}},{path:"/StRollBallBettingPage",name:"RollBallBettingPage",component:function(){return Promise.all([n.e(0),n.e(6)]).then(n.bind(null,"BL5k"))}},{path:"/StBallBettingPage",name:"BallBettingPage",component:function(){return Promise.all([n.e(0),n.e(5)]).then(n.bind(null,"d6OJ"))}},{path:"/StLeagueBetting",name:"StLeagueBetting",component:function(){return Promise.all([n.e(0),n.e(4)]).then(n.bind(null,"HoHQ"))}}]});l.beforeEach(function(t,e,n){console.log(t),"/StRollBallpage"==t.path&&(t.query.isTrue=!0),n()});var u=l,c=n("vT+3"),s=n.n(c),p=(n("Y96J"),n("aozt")),f=n.n(p),m=n("rVsN"),g=n.n(m),d=n("6iV/"),h=n.n(d),b=n("R4Sj");a.default.use(b.a);var v={gameRatio:"",activity:"",ballId:""},B={getGameRatio:function(t){return t.gameRatio},getActivity:function(t){return t.activity},getBallId:function(){return v.ballId}},y=new b.a.Store({state:v,getters:B,mutations:{newGameRatio:function(t,e){t.gameRatio=e},newActivity:function(t,e){t.activity=e},newBallId:function(t,e){t.ballId=e}},actions:{GETGAMERATIO:function(t,e){t.commit("newGameRatio",e)},GETACTIVITY:function(t,e){t.commit("newActivity",e)},GET_BALL_ID:function(t,e){t.commit("newBallId",e)}}}),R=n("gnGy");f.a.defaults.baseURL="生产环境",f.a.defaults.timeout=1e4;var w="http://sports.5gogo.com";function T(t){return t=w+t}f.a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8",f.a.interceptors.request.use(function(t){var e=y.state.token;return e&&(t.headers.Authorization=e),t},function(t){return g.a.error(t)}),f.a.interceptors.response.use(function(t){return 200===t.status?g.a.resolve(t):g.a.reject(t)},function(t){if(t.response.status){switch(t.response.status){case 401:u.replace({path:"/login",query:{redirect:u.currentRoute.fullPath}});break;case 403:Object(R.a)({message:"登录过期,请重新登录",duration:1e3,forbidClick:!0}),localStorage.removeItem("token"),y.commit("loginSuccess",null),setTimeout(function(){u.replace({path:"/login",query:{redirect:u.currentRoute.fullPath}})},1e3);break;case 404:Object(R.a)({message:"网络请求不存在",duration:1500,forbidClick:!0});break;default:Object(R.a)({message:t.response.data.message,duration:1500,forbidClick:!0})}return g.a.reject(t.response)}});var A={get:function(t,e){return new g.a(function(n,a){console.log(T(t)),f.a.get(T(t),{params:e}).then(function(t){n(t)}).catch(function(t){a(t)})})},post:function(t,e){return new g.a(function(n,a){f.a.post(T(t),h.a.stringify(e)).then(function(t){n(t)}).catch(function(t){a(t)})})}};a.default.use(s.a),a.default.config.productionTip=!1,a.default.prototype.$ports={sign:{login:""},home:{navTypeList:"/sports/head/typeList",ballList:"/sports/head/ballList",trollingBall:"/sports/RollingBall/getrollingball"},match:{},gambling:{}},a.default.prototype.$http=A,a.default.prototype.$axios=f.a,new a.default({el:"#app",router:u,components:{App:r},template:"<App/>"})},Wogf:function(t,e){},Y96J:function(t,e){}},["NHnr"]);
  2. //# sourceMappingURL=app.fd4bac4089debd2d8fad.js.map