(function(e){function t(t){for(var a,i,c=t[0],o=t[1],l=t[2],p=0,g=[];p1?a("ul",{staticClass:"page-content clearfix"},[a("li",{class:["page-item","page-item-oprea",{"page-oprea-no-allowed":1==e.pages.currentPage}],on:{click:function(t){return e.handleChangePage("desc")}}},[e._v(" 上一页 ")]),e._l(e.pages.allPage,(function(t,n){return a("li",{key:n,class:["page-item",{active:e.pages.currentPage==t}],on:{click:function(t){return e.handleGoPage(n+1)}}},[e._v(" "+e._s(n+1)+" ")])})),a("li",{class:["page-item","page-item-oprea",{"page-oprea-no-allowed":e.pages.currentPage==e.pages.allPage.length}],on:{click:function(t){return e.handleChangePage("asc")}}},[e._v(" 下一页 ")])],2):a("ul",{staticClass:"page-content clearfix"},[a("li",{staticClass:"page-item active"},[e._v("1")])])]),e._m(0)])},s=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"tips"},[a("img",{attrs:{src:n("75e1")}})])}],i=(n("d81d"),n("fb6a"),n("96cf"),n("1da1")),c=(n("4160"),n("baa5"),n("b64b"),n("d3b7"),n("159b"),"http://pgame.ouj.com/hdCenter");function o(e,t){e=c+e;var n="";return Object.keys(t).forEach((function(e){n+=e+"="+t[e]+"&"})),""!==n&&(n=n.substr(0,n.lastIndexOf("&")),e=e+"?"+n),new Promise((function(t,n){var a=new XMLHttpRequest;a.open("GET",e,!0),a.onreadystatechange=function(){if(4===this.readyState)if(200===this.status)t(JSON.parse(this.responseText),this);else{var e={code:this.status,response:this.response};n(e,this)}},a.send()}))}var l=n("5e2c"),u=n.n(l),p={name:"App",data:function(){return{name:"APP",navList:[],tabIndex:1,pages:{length:0,allPage:[],currentPage:1},type:"",productList:[]}},mounted:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.handleGetData(e.type,e.pages.currentPage),(new Image).src="http://clickstats.ouj.com/?r=stats/index&event=hiydshop_recom_list_load";case 2:case"end":return t.stop()}}),t)})))()},methods:{handleGetData:function(e,t){var n=this;return Object(i["a"])(regeneratorRuntime.mark((function a(){var r,s;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,o("/index",{type:e,p:t});case 2:r=a.sent,r.data.pages?(n.pages.length=r.data.pages.total_count,n.pages.allPage=r.data.pages.all_pages):n.pages={length:0,allPage:[],currentPage:1},n.productList=r.data.item_list,n.navList=r.data.type_list,s=n,n.$nextTick((function(){var e=document.getElementsByClassName("content-img");[].slice.call(e).map((function(e){s.initImage(e)}))}));case 8:case"end":return a.stop()}}),a)})))()},initImage:function(e){var t=new Image;t.src=e.dataset.img,t.onload=function(){e.src=e.dataset.img,e.className+=" img"},t.onerror=function(){e.src=u.a,e.className+=" img"}},handleChangeTab:function(e){this.tabIndex=e,this.type=e,this.pages.currentPage=1,this.handleGetData(this.type,this.pages.currentPage),this.handleClickStat()},handleChangePage:function(e){if("asc"===e){if(this.pages.currentPage==this.pages.allPage.length)return;this.pages.currentPage=this.pages.currentPage+1,this.handleGetData(this.type,this.pages.currentPage)}else if("desc"===e){if(1==this.pages.currentPage)return;this.pages.currentPage=this.pages.currentPage-1,this.handleGetData(this.type,this.pages.currentPage)}else console.log(this.pages.currentPage)},handleGoPage:function(e){this.pages.currentPage=e,this.handleGetData(this.type,e)},handleClickStat:function(){(new Image).src="http://clickstats.ouj.com/?r=stats/index&event=hiydshop_recom_list_click"}}},g=p,h=(n("034f"),n("2877")),d=Object(h["a"])(g,r,s,!1,null,null,null),f=d.exports;a["a"].config.productionTip=!1,new a["a"]({render:function(e){return e(f)}}).$mount("#app")},"5e2c":function(e,t,n){e.exports=n.p+"img/no-img.08b9ea21.png"},"75e1":function(e,t,n){e.exports=n.p+"img/share.9ed13c71.png"},"85ec":function(e,t,n){},cf1c:function(e,t,n){e.exports=n.p+"img/loading.6cec7c5c.gif"}}); //# sourceMappingURL=app.f47666f1.js.map