webpackJsonp([21],{GqNz:function(t,e){},muBY:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("vMJZ"),i={name:"BuyIndex",data:()=>({showList:!0,showNodata:!1,page:0,pageCount:0,active:0,buyData:[{title:"套餐1",id:67,adddate:"2019-05-22 17:11:41",price:10,user_title:"使用中",photourl:"/UploadFiles/2019/112/7132010694788099.jpg",packid:1,packdays:8,expiredate:"2019-05-30 17:11:41",use_flag:1}],myData:[{title:"套餐1",id:67,adddate:"2019-05-22 17:11:41",price:10,user_title:"使用中",photourl:"/UploadFiles/2019/112/7132010694788099.jpg",packid:1,packdays:8,expiredate:"2019-05-30 17:11:41",use_flag:1}]}),methods:{onClickLeft(){this.$router.go(-1)},open(t,e){this.$router.push({path:t,query:{id:e}})},getNewData(t){this.myFeeSellList(t),this.getFeePackagesList(t)},getData(t){0==t?this.myFeeSellList():1==t&&this.getFeePackagesList()},myFeeSellList(t=1,e){Object(s.l)({page:t,pagesize:5,showtype:e||0}).then(e=>{1==e.result?(this.myData=e.data,this.showList=!0,this.showNodata=!1,this.page=t,this.pageCount=e.pagecount):(this.showList=!1,this.showNodata=!0,this.page=0,this.pageCount=0)})},getFeePackagesList(t=1){Object(s.g)({page:t,pagesize:5}).then(e=>{1==e.result?(this.buyData=e.data,this.showList=!0,this.showNodata=!1,this.page=t,this.pageCount=e.pagecount):(this.showList=!1,this.showNodata=!0,this.page=0,this.pageCount=0)})}},created(){this.myFeeSellList()}},n={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ks-page-scroll-container",{attrs:{page:t.page,"page-count":t.pageCount},on:{"page-change":t.getNewData}},[a("div",{staticClass:"buyIndex"},[a("van-nav-bar",{attrs:{title:"考试套餐包","left-arrow":""},on:{"click-left":t.onClickLeft}}),t._v(" "),a("van-tabs",{on:{click:t.getData},model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[a("van-tab",{attrs:{title:"我的考试包"}},[t.showList?a("div",t._l(t.myData,function(e,s){return null!=t.myData?a("div",{key:s,staticClass:"buyIndex-my"},[a("div",{staticClass:"buyIndex-my__box",style:{backgroundImage:"url("+e.photourl+")",backgroundRepeat:"noRepeat center center",backgroundSize:"cover"},on:{click:function(a){return t.open("/buy/buyDetail",e.id)}}},[a("div",{staticClass:"buyIndex-my__top"},[0==e.use_flag?a("div",{staticClass:"buyIndex-buy__top-text"},[t._v("未使用")]):1==e.use_flag?a("div",{staticClass:"buyIndex-buy__top-text"},[t._v("使用中")]):2==e.use_flag?a("div",{staticClass:"buyIndex-my__top-text"},[t._v("已到期")]):t._e(),t._v(" "),a("span",[t._v("*有效期至："+t._s(e.expiredate))])]),t._v(" "),a("p",[t._v(t._s(e.title))])])]):t._e()}),0):t._e(),t._v(" "),t.showNodata?a("div",{staticClass:"buyIndex-noShow"},[a("no-data")],1):t._e()]),t._v(" "),a("van-tab",{attrs:{title:"购买考试包"}},[t.showList?a("div",t._l(t.buyData,function(e,s){return null!=t.buyData?a("div",{key:s,staticClass:"buyIndex-buy"},[a("div",{staticClass:"buyIndex-buy__box",style:{background:"url("+e.photourl+")",backgroundRepeat:"noRepeat center center",backgroundSize:"cover"},on:{click:function(a){return t.open("/buy/buyDetail",e.id)}}},[a("div",{staticClass:"buyIndex-buy__top"},[1==e.isuser?a("div",{staticClass:"buyIndex-buy__top-text"},[t._v("已拥有")]):t._e(),t._v(" "),a("span",[t._v("*有效期至："+t._s(e.days)+"天")])]),t._v(" "),a("div",{staticClass:"buyIndex-buy__bottom"},[a("p",[t._v(t._s(e.title))]),t._v(" "),a("span",[t._v("￥"+t._s(e.price))])])])]):t._e()}),0):t._e(),t._v(" "),t.showNodata?a("div",{staticClass:"buyIndex-noShow"},[a("no-data")],1):t._e()]),t._v(" "),a("van-tab",{attrs:{title:"购买明细"}},[t.showList?a("div",t._l(t.myData,function(e,s){return a("div",{key:s,staticClass:"buyIndex-detail"},[a("h1",[t._v("购买时间："+t._s(e.adddate))]),t._v(" "),a("div",{staticClass:"buyIndex-detail__price"},[a("p",[t._v(t._s(e.title))]),t._v(" "),a("span",[t._v("￥"+t._s(e.price))])]),t._v(" "),a("div",{staticClass:"buyIndex-detail__term"},[a("p",[t._v("有效期："+t._s(e.expiredate))]),t._v(" "),0==e.use_flag?a("span",[t._v("未使用")]):1==e.use_flag?a("span",[t._v("使用中")]):2==e.use_flag?a("span",[t._v("已到期")]):t._e()])])}),0):t._e(),t._v(" "),t.showNodata?a("div",{staticClass:"buyIndex-noShow"},[a("no-data")],1):t._e()])],1)],1)])},staticRenderFns:[]};var o=a("C7Lr")(i,n,!1,function(t){a("GqNz")},"data-v-234b5f60",null);e.default=o.exports}});