(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a9916ebe"],{"031a":function(t,e,i){t.exports=i.p+"img/icon-pending-buy.d9b840f0.png"},4453:function(t,e,i){"use strict";i("8099")},8099:function(t,e,i){},b0a1:function(t,e,i){t.exports=i.p+"img/icon-status-buy.9f15f255.png"},ef5a:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"van-swipe-item",on:{click:t.handleClick}},[i("div",{staticClass:"card-content"},[i("div",{staticClass:"card-header mb8"},[i("div",{staticClass:"card-title"},[t._v(t._s(t.item.stadium_name))]),i("div",{staticClass:"card-tag"},[t._v(t._s(t.item.sport_tag_name))])]),i("div",{staticClass:"card-info"},[i("div",{staticClass:"info-row"},[t._v(t._s(t.item.ground_name)+" - "+t._s(t.item.field_name))]),i("div",{staticClass:"info-row"},[t._v(t._s(t.item.date_str)+" "+t._s(t.item.time_range))])]),i("div",{staticClass:"card-status"},[i("div",{staticClass:"status-tag pl13 pr13"},[t._v("\n        "+t._s(t.getPeopleText(t.item))+"\n      ")])]),i("div",{staticClass:"card-footer pl8"},[i("div",{staticClass:"price-section"},[i("span",{staticClass:"price-symbol"},[t._v("¥")]),i("span",{staticClass:"price-value"},[t._v(t._s(t.item.current_price))]),i("span",{staticClass:"price-unit"},[t._v("人")])]),"00:00:00"!==t.countdownTime&&1!=t.item.pin_status?i("div",{staticClass:"countdown"},[i("span",{staticClass:"countdown-label"},[t._v("距结束")]),i("span",{staticClass:"countdown-time"},[t._v(t._s(t.countdownTime))])]):t._e(),t.showDetail?t._e():i("div",{staticClass:"status-icon"},["00:00:00"!==t.countdownTime&&1!=t.item.pin_status?i("img",{staticClass:"avatar",attrs:{src:t.ongoingIcon},on:{click:function(e){return e.stopPropagation(),t.handleClick.apply(null,arguments)}}}):t._e()])])])])},n=[],s=(i("2397"),i("a481"),i("6b54"),i("f576"),i("c5f6"),i("d4ec")),o=i("bee2"),c=i("99de"),r=i("7e84"),u=i("262e"),l=i("9ab4"),d=i("60a3"),m=i("031a"),p=i.n(m),v=i("b0a1"),_=i.n(v);function f(t,e,i){return e=Object(r["a"])(e),Object(c["a"])(t,h()?Reflect.construct(e,i||[],Object(r["a"])(t).constructor):e.apply(t,i))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(h=function(){return!!t})()}var b=function(t){function e(){var t;return Object(s["a"])(this,e),t=f(this,e,arguments),t.pendingIcon=p.a,t.ongoingIcon=_.a,t.countdownTime="00:00:00",t.timer=null,t}return Object(u["a"])(e,t),Object(o["a"])(e,[{key:"getPeopleText",value:function(t){var e=t.real_current_persons,i=Number(t.min_persons),a=Number(t.max_persons);return e>0&&e<i?"".concat(e,"人在拼场，差").concat(i-e,"人可开场"):e>=i&&e<a?"已满足开场，差".concat(a-e,"人满场"):e==a?"".concat(e,"人在拼场，已满场"):0==e?"".concat(i,"人即可开场，满场").concat(a,"人"):"未拼成，人数不足"}},{key:"formatTime",value:function(t){return t.toString().padStart(2,"0")}},{key:"calculateCountdown",value:function(){if(!this.item.deadline_time_str)return this.countdownTime="00:00:00",void this.stopTimer();var t=(new Date).getTime(),e=this.item.deadline_time_str.replace(/-/g,"/"),i=new Date(e).getTime(),a=i-t;if(a<=0)return this.countdownTime="00:00:00",void this.stopTimer();var n=Math.floor(a/36e5),s=Math.floor(a%36e5/6e4),o=Math.floor(a%6e4/1e3);this.countdownTime="".concat(this.formatTime(n),":").concat(this.formatTime(s),":").concat(this.formatTime(o))}},{key:"startTimer",value:function(){var t=this;this.stopTimer(),this.calculateCountdown(),this.timer=setInterval((function(){t.calculateCountdown()}),1e3)}},{key:"stopTimer",value:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}},{key:"mounted",value:function(){this.startTimer()}},{key:"beforeDestroy",value:function(){this.stopTimer()}},{key:"handlePinClick",value:function(){var t=this.item,e=t.stadium_id,i=t.sport_tag_id;this.$router.push({name:"StadiumOrder",query:{stadium_id:e,sport_tag_id:i}})}},{key:"handleClick",value:function(){this.$router.push({path:"MatchFieldDetail",query:{stadium_id:this.item.stadium_id,session_no:this.item.session_no,activity_id:this.item.activity_id}})}}])}(d["f"]);l["a"]([Object(d["d"])({})],b.prototype,"item",void 0),l["a"]([Object(d["d"])({default:!1})],b.prototype,"notShowMin",void 0),l["a"]([Object(d["d"])({default:!1})],b.prototype,"showDetail",void 0),l["a"]([Object(d["b"])("click")],b.prototype,"handleClick",null),b=l["a"]([d["a"]],b);var C=b,w=C,g=(i("4453"),i("2877")),y=Object(g["a"])(w,a,n,!1,null,"f06cc022",null);e["default"]=y.exports}}]);