(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-54163d57"],{"031a":function(t,e,i){t.exports=i.p+"img/icon-pending-buy.d9b840f0.png"},"10d5":function(t,e,i){"use strict";i("adfc")},adfc: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")),c=i("bee2"),o=i("262e"),r=i("99de"),u=i("7e84"),l=i("9ab4"),d=i("60a3"),m=i("031a"),p=i.n(m),f=i("b0a1"),v=i.n(f);function _(t){var e=h();return function(){var i,a=Object(u["a"])(t);if(e){var n=Object(u["a"])(this).constructor;i=Reflect.construct(a,arguments,n)}else i=a.apply(this,arguments);return Object(r["a"])(this,i)}}function h(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var b=function(t){Object(o["a"])(i,t);var e=_(i);function i(){var t;return Object(s["a"])(this,i),t=e.apply(this,arguments),t.pendingIcon=p.a,t.ongoingIcon=v.a,t.countdownTime="00:00:00",t.timer=null,t}return Object(c["a"])(i,[{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),c=Math.floor(a%6e4/1e3);this.countdownTime="".concat(this.formatTime(n),":").concat(this.formatTime(s),":").concat(this.formatTime(c))}},{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}})}}]),i}(d["g"]);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 y=b,C=y,w=(i("10d5"),i("2877")),g=Object(w["a"])(C,a,n,!1,null,"3b7c0c3b",null);e["default"]=g.exports}}]);
//# sourceMappingURL=chunk-54163d57.bebb850e.js.map