(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/miaosha/advance/advance"],{"29b0a":function(t,e,n){"use strict";var i=n("7bc2"),r=n.n(i);r.a},"2d04":function(t,e,n){"use strict";n.r(e);var i=n("f909"),r=n.n(i);for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=r.a},"42a5":function(t,e,n){"use strict";n.r(e);var i=n("8e818"),r=n("2d04");for(var a in r)"default"!==a&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("29b0a");var o,s=n("f0c5"),c=Object(s["a"])(r["default"],i["b"],i["c"],!1,null,"6b667922",null,!1,i["a"],o);e["default"]=c.exports},"7bc2":function(t,e,n){},"8e818":function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}));var r=function(){var t=this,e=t.$createElement;t._self._c},a=[]},db04:function(t,e,n){"use strict";(function(t){n("2d0a");i(n("66fd"));var e=i(n("42a5"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},f909:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n("a34a")),r=n("2f62");function a(t){return t&&t.__esModule?t:{default:t}}function o(t){return l(t)||u(t)||c(t)||s()}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t,e){if(t){if("string"===typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(t,e):void 0}}function u(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function l(t){if(Array.isArray(t))return p(t)}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0?(t.type=1,t.open_time=t.time_list[0].open_time,t.getGoodsList({open_time:t.open_time,type:t.type})):1===t.is_estimate&&(t.type=2,t.open_time=0,t.is_booking=!0,t.getGoodsList({open_time:t.open_time,type:t.type})))})),wx.showShareMenu({menus:["shareAppMessage","shareTimeline"]})},onShow:function(){1===this.type&&this.set_time(this.time_list[this.active_index].date_time)},onHide:function(){clearInterval(this.time)},onUnload:function(){clearInterval(this.time)},methods:{getTimeList:function(){var e=this;return d(i.default.mark((function n(){var r,a,o,s,c;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t.showLoading({title:"加载中..."}),n.prev=1,n.next=4,e.$request({url:e.$api.miaosha.time_list,method:"get"});case 4:r=n.sent,0===r.code&&(a=r.data,o=a.is_estimate,s=a.list,c=a.next_miaosha_date_time,e.time_list=s,e.is_estimate=o,e.next_time=c),n.next=11;break;case 8:throw n.prev=8,n.t0=n["catch"](1),new Error(n.t0);case 11:t.hideLoading();case 12:case"end":return n.stop()}}),n,null,[[1,8]])})))()},getGoodsList:function(t){var e=this;return d(i.default.mark((function n(){var r;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,e.open_time=t.open_time,e.type=t.type,1===e.type?e.set_time(t.date_time):clearInterval(e.time),n.next=6,e.$request({url:e.$api.miaosha.goods,data:{open_time:t.open_time,type:t.type,page:e.page?e.page:1}});case 6:r=n.sent,0===r.code&&(e.goods_list=r.data.list,e.page_count=r.data.pagination.page_count),n.next=13;break;case 10:throw n.prev=10,n.t0=n["catch"](0),new Error(n.t0);case 13:case"end":return n.stop()}}),n,null,[[0,10]])})))()},activeTime:function(t,e){this.active_index=e,this.scroll_id="ms_".concat(e),this.page=1,this.getGoodsList(t),this.getTimeList(),2===t.type?this.is_booking=!0:this.is_booking=!1},scrollLower:function(){var t=this;return d(i.default.mark((function e(){var n;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(e.prev=0,!(t.page>=t.page_count)){e.next=3;break}return e.abrupt("return");case 3:return t.page++,e.next=6,t.$request({url:t.$api.miaosha.goods,data:{open_time:t.open_time,type:t.type,page:t.page}});case 6:n=e.sent,0===n.code&&(t.goods_list=[].concat(o(t.goods_list),o(n.data.list))),e.next=13;break;case 10:throw e.prev=10,e.t0=e["catch"](0),new Error(e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))()},set_nav:function(){var t=null;t=this.currentRoute;for(var e=0;e0?r+"天"+a+":"+(o<10?"0"+o:o)+":"+(s<10?"0"+s:s):a+":"+(o<10?"0"+o:o)+":"+(s<10?"0"+s:s),this.time=setInterval((function(){var t=n.getTime()-(new Date).getTime();t<0&&(clearInterval(e.time),e.time_list[e.active_index].status=2);var i=parseInt(t/1e3/60/60/24%30),r=parseInt(t/1e3/60/60%24),a=parseInt(t/1e3/60%60),o=parseInt(t/1e3%60);e.html=i>0?i+"天"+r+":"+(a<10?"0"+a:a)+":"+(o<10?"0"+o:o):r+":"+(a<10?"0"+a:a)+":"+(o<10?"0"+o:o)}),1e3)}},router_go:function(){t.reLaunch({url:"/pages/index/index"})}},onShareAppMessage:function(){return this.$shareAppMessage({path:"/plugins/miaosha/advance/advance",title:this.$children[0].navigationBarTitle})},onShareTimeline:function(){return this.$shareTimeline({title:this.$children[0].navigationBarTitle,query:{}})},components:{"product-list":g},watch:{tabBarNavs:{handler:function(){this.set_nav()},immediate:!0}}};e.default=_}).call(this,n("543d")["default"])}},[["db04","common/runtime","common/vendor"]]]);