text: (function(e){function t(t){for(var r,i,u=t[0],l=t[1],s=t[2],p=0,v=[];p<u.length;p++)i=u[p],o[i]&&v.push(o[i][0]),o[i]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);c&&c(t);while(v.length)v.shift()();return a.push.apply(a,s||[]),n()}function n(){for(var e,t=0;t<a.length;t++){for(var n=a[t],r=!0,u=1;u<n.length;u++){var l=n[u];0!==o[l]&&(r=!1)}r&&(a.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},o={app:0},a=[];function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var u=window["webpackJsonp"]=window["webpackJsonp"]||[],l=u.push.bind(u);u.push=t,u=u.slice();for(var s=0;s<u.length;s++)t(u[s]);var c=l;a.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},"034f":function(e,t,n){"use strict";var r=n("64a9"),o=n.n(r);o.a},4805:function(e,t,n){"use strict";var r=n("897e"),o=n.n(r);o.a},"56d7":function(e,t,n){"use strict";n.r(t);n("cadf"),n("551c"),n("f751"),n("097d");var r=n("2b0e"),o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("router-view")],1)},a=[],i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"hello"},[n("h1",[e._v(e._s(e.msg))]),e._m(0),n("h3",[e._v("Installed CLI Plugins")]),e._m(1),n("h3",[e._v("Essential Links")]),e._m(2),n("h3",[e._v("Ecosystem")]),e._m(3)])},u=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",[e._v("\n    For a guide and recipes on how to configure / customize this project,"),n("br"),e._v("\n    check out the\n    "),n("a",{attrs:{href:"https://cli.vuejs.org",target:"_blank",rel:"noopener"}},[e._v("vue-cli documentation")]),e._v(".\n  ")])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ul",[n("li",[n("a",{attrs:{href:"https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel",target:"_blank",rel:"noopener"}},[e._v("babel")])]),n("li",[n("a",{attrs:{href:"https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint",target:"_blank",rel:"noopener"}},[e._v("eslint")])])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ul",[n("li",[n("a",{attrs:{href:"https://vuejs.org",target:"_blank",rel:"noopener"}},[e._v("Core Docs")])]),n("li",[n("a",{attrs:{href:"https://forum.vuejs.org",target:"_blank",rel:"noopener"}},[e._v("Forum")])]),n("li",[n("a",{attrs:{href:"https://chat.vuejs.org",target:"_blank",rel:"noopener"}},[e._v("Community Chat")])]),n("li",[n("a",{attrs:{href:"https://twitter.com/vuejs",target:"_blank",rel:"noopener"}},[e._v("Twitter")])]),n("li",[n("a",{attrs:{href:"https://news.vuejs.org",target:"_blank",rel:"noopener"}},[e._v("News")])])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ul",[n("li",[n("a",{attrs:{href:"https://router.vuejs.org",target:"_blank",rel:"noopener"}},[e._v("vue-router")])]),n("li",[n("a",{attrs:{href:"https://vuex.vuejs.org",target:"_blank",rel:"noopener"}},[e._v("vuex")])]),n("li",[n("a",{attrs:{href:"https://github.com/vuejs/vue-devtools#vue-devtools",target:"_blank",rel:"noopener"}},[e._v("vue-devtools")])]),n("li",[n("a",{attrs:{href:"https://vue-loader.vuejs.org",target:"_blank",rel:"noopener"}},[e._v("vue-loader")])]),n("li",[n("a",{attrs:{href:"https://github.com/vuejs/awesome-vue",target:"_blank",rel:"noopener"}},[e._v("awesome-vue")])])])}],l={name:"HelloWorld",props:{msg:String}},s=l,c=(n("4805"),n("2877")),p=Object(c["a"])(s,i,u,!1,null,"b9167eee",null),v=p.exports,f={name:"app",components:{HelloWorld:v}},h=f,m=(n("034f"),Object(c["a"])(h,o,a,!1,null,null,null)),d=m.exports,g=n("8c4f"),b=n("2f62"),_=n("bc3a"),j=n.n(_);r["a"].use(b["a"]);var O=new b["a"].Store({state:{token:"",movies:[]},mutations:{saveToken:function(e,t){e.token=t},logout:function(e){e.token=""},saveMovie:function(e,t){e.movies=t}},actions:{login:function(e,t){return j.a.post("http://localhost:8000/login",t)},getMovie:function(e){j.a.get("/ajax/movieOnInfoList").then(function(t){e.commit("saveMovie",t.data.movieList)})},getDetail:function(e,t){return j.a.get("/ajax/detailmovie?movieId="+t)}}}),y=O,w=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v(" 登录页 ")]),n("div",[n("input",{directives:[{name:"model",rawName:"v-model",value:e.username,expression:"username"}],attrs:{type:"text"},domProps:{value:e.username},on:{input:function(t){t.target.composing||(e.username=t.target.value)}}}),n("input",{directives:[{name:"model",rawName:"v-model",value:e.pwd,expression:"pwd"}],attrs:{type:"text"},domProps:{value:e.pwd},on:{input:function(t){t.target.composing||(e.pwd=t.target.value)}}}),n("button",{on:{click:e.login}},[e._v(" 登录 ")])])])},k=[],P={data:function(){return{username:"",pwd:""}},methods:{login:function(){var e=this;this.$store.dispatch("login",{username:this.username,pwd:this.pwd}).then(function(t){console.log(t),"ok"==t.data.mess&&(e.$store.commit("saveToken",t.data.token),e.$router.push("/home"))})}}},x=P,E=Object(c["a"])(x,w,k,!1,null,null,null),$=E.exports,M=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v(" 首页 ")]),n("h2",[e._v(" "+e._s(e.name)+" ")]),n("router-link",{attrs:{to:"/movie"}},[e._v("电影")])],1)},D=[],S={data:function(){return{name:"hello world"}}},C=S,T=Object(c["a"])(C,M,D,!1,null,null,null),I=T.exports,L=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},q=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v("需要登录后才能访问的页面")]),n("h2",[e._v("看到次页面说明登录成功")])])}],N={},A=N,B=Object(c["a"])(A,L,q,!1,null,null,null),F=B.exports,H=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v("电影")]),n("u",e._l(e.movies,function(t){return n("li",{key:t.id,on:{click:function(n){return e.detail(t.id)}}},[e._v("\n            "+e._s(t.nm)+"\n        ")])}),0)])},J=[],W=(n("8e6e"),n("ac6a"),n("456d"),n("bd86"));function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(n,!0).forEach(function(t){Object(W["a"])(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var K={mounted:function(){this.getMovie()},computed:G({},Object(b["c"])(["movies"])),methods:G({},Object(b["b"])(["getMovie","getBooks"]),{detail:function(e){this.$router.push({name:"detail",params:{id:e}})}})},Q=K,R=Object(c["a"])(Q,H,J,!1,null,null,null),U=R.exports,V=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h1",[e._v(e._s(e.detailMovie.nm))])])},X=[];function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(n,!0).forEach(function(t){Object(W["a"])(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ee={data:function(){return{detailMovie:{}}},mounted:function(){var e=this,t=this.$route.params.id;console.log(t),this.getDetail(t).then(function(t){console.log(t),e.detailMovie=t.data.detailMovie}).catch(function(e){})},methods:Z({},Object(b["b"])(["getDetail","getBooks"]))},te=ee,ne=Object(c["a"])(te,V,X,!1,null,null,null),re=ne.exports;r["a"].use(g["a"]);var oe=new g["a"]({routes:[{path:"/",redirect:"/home"},{path:"/login",component:$},{path:"/home",component:I},{path:"/private",meta:{requireAuth:!0},component:F},{path:"/movie",component:U},{name:"detail",path:"/detail/:id",component:re}]});oe.beforeEach(function(e,t,n){e.matched.some(function(e){return e.meta.requireAuth})?y.state.token?n():n({path:"/login",query:{redirect:e.fullPath}}):n()});var ae=oe;new r["a"]({router:ae,store:y,render:function(e){return e(d)}}).$mount("#app")},"64a9":function(e,t,n){},"897e":function(e,t,n){}});
  //# sourceMappingURL=app.3edb544e.js.map