(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/foot/index/index"],{3162:function(t,e,o){"use strict";var i;o.d(e,"b",(function(){return n})),o.d(e,"c",(function(){return s})),o.d(e,"a",(function(){return i}));var n=function(){var t=this,e=t.$createElement;t._self._c;t._isMounted||(t.e0=function(e){t.beDelete=!0})},s=[]},"5dca":function(t,e,o){"use strict";var i=o("821e"),n=o.n(i);n.a},"5de4":function(t,e,o){"use strict";o.r(e);var i=o("a993"),n=o.n(i);for(var s in i)"default"!==s&&function(t){o.d(e,t,(function(){return i[t]}))}(s);e["default"]=n.a},"821e":function(t,e,o){},a813:function(t,e,o){"use strict";(function(t){o("ecb4");i(o("66fd"));var e=i(o("b55a"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,o("543d")["createPage"])},a993:function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=o("2f62");function n(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}function s(t){for(var e=1;e0?t.navigateTo({url:"/plugins/mch/goods/goods?id="+e.goods_id+"&mch_id="+e.mch_id}):"advance"==e.sign?t.navigateTo({url:"/plugins/advance/detail/detail?id="+e.goods_id}):"pintuan"==e.sign?t.navigateTo({url:"/plugins/pt/goods/goods?goods_id="+e.goods_id}):"miaosha"==e.sign?t.navigateTo({url:"/plugins/miaosha/goods/goods?id="+e.goods_id}):"gift"==e.sign?t.navigateTo({url:"/plugins/gift/goods/goods?id="+e.goods_id}):"advance"==e.sign?t.navigateTo({url:"/plugins/advance/detail/detail?id="+e.goods_id}):"booking"==e.sign?t.navigateTo({url:"/plugins/book/goods/goods?goods_id="+e.goods_id}):""==e.sign?t.navigateTo({url:"/pages/goods/goods?id="+e.goods_id}):t.navigateTo({url:"/plugins/"+e.sign+"/goods/goods?goods_id="+e.goods_id})},startChange:function(t){this.chooseStart=t.detail.value},endChange:function(t){this.chooseEnd=t.detail.value},toChoose:function(){var e=this.years[this.chooseStart[0]],o=this.months[this.chooseStart[1]],i=this.days[this.chooseStart[2]],n=this.years[this.chooseEnd[0]],s=this.months[this.chooseEnd[1]],a=this.days[this.chooseEnd[2]];+n<+e||+n==+e&&(+s<+o||s==+o&&+a<+i)?t.showToast({title:"结束时间不应早于开始时间",icon:"none",duration:1e3}):(this.otherday=!0,o>=1&&o<=9&&(o="0"+o),i>=1&&i<=9&&(i="0"+i),this.start_time=e+"-"+o+"-"+i,s>=1&&s<=9&&(s="0"+s),a>=1&&a<=9&&(a="0"+a),this.end_time=n+"-"+s+"-"+a,this.chooseTime=!1,this.showTime=this.start_time.substr(5).replace("-",".")+"-"+this.end_time.substr(5).replace("-","."),t.showLoading({title:"加载中..."}),this.page=1,this.list=[],this.getList())},choose:function(){var t,e,o=this;o.start=[],o.end=[],t=o.start_time?o.start_time:o.today,e=o.end_time?o.end_time:o.today,o.years.forEach((function(e,i){t.substring(0,4)==o.years[i]&&(o.start[0]=+i)})),o.months.forEach((function(e,i){t.substring(5,7)==o.months[i]&&(o.start[1]=+i)})),o.days.forEach((function(e,i){t.substring(8,10)==o.days[i]&&(o.start[2]=+i)})),o.years.forEach((function(t,i){e.substring(0,4)==o.years[i]&&(o.end[0]=+i)})),o.months.forEach((function(t,i){e.substring(5,7)==o.months[i]&&(o.end[1]=+i)})),o.days.forEach((function(t,i){e.substring(8,10)==o.days[i]&&(o.end[2]=+i)})),o.chooseStart=o.start,o.chooseEnd=o.end,o.chooseTime=!o.chooseTime},toDelete:function(){var e=this;e.$request({url:e.$api.foot.del,data:{id:e.detail.id}}).then((function(o){t.hideLoading(),e.$hideLoading(),0==o.code?(e.showText=o.msg,e.closeMenu(),e.dateList.goods.splice(e.index,1),setTimeout((function(t){e.showText=!1}),1e3)):t.showToast({title:o.msg,icon:"none",duration:1e3})})).catch((function(o){t.hideLoading(),e.$hideLoading()}))},toShow:function(t,e,o){this.detail=t,this.dateList=e,this.index=o,this.showMenu=!0},closeMenu:function(){this.detail={},this.beDelete=!1,this.showMenu=!1},cancel:function(){this.chooseTime=!1,this.otherday=!1,this.chooseStart=[],this.chooseEnd=[]},getList:function(){var e=this;if(e.loading)return!1;e.loading=!0,e.$request({url:e.$api.foot.index,data:{start_time:e.start_time+" 00:00:00",end_time:e.end_time+" 23:59:59",page:e.page}}).then((function(o){e.loading=!1,t.hideLoading(),e.$hideLoading(),0==o.code?e.list.length>0?(e.list[e.list.length-1].date==o.list[0].date&&(e.list[e.list.length-1].goods=e.list[e.list.length-1].goods.concat(o.list.shift().goods)),e.list=e.list.concat(o.list)):e.list=e.list.concat(o.list):t.showToast({title:o.msg,icon:"none",duration:1e3})})).catch((function(o){e.loading=!1,t.hideLoading(),e.$hideLoading(),e.$event.on(e.$const.EVENT_USER_LOGIN).then((function(){e.getList()}))}))},toFavorite:function(){var e=this;e.$request({url:e.$api.user.favorite_add,data:{goods_id:e.detail.goods_id}}).then((function(o){0==o.code||"已经收藏过啦!"==o.msg?(e.showText=o.msg,e.closeMenu(),setTimeout((function(t){e.showText=!1}),1e3)):t.showToast({title:o.msg,icon:"none",duration:1e3})}))},getDate:function(){var t=new Date,e=t.getFullYear(),o=t.getMonth()+1;o>=1&&o<=9&&(o="0"+o);var i=t.getDate();this.today=e+"-"+o+"-"+i;var n=Date.parse(new Date),s=1e3*(n/1e3-86400),a=new Date(s),r=a.getFullYear(),d=a.getMonth()+1;d>=1&&d<=9&&(d="0"+d);var u=a.getDate();this.yesterday=r+"-"+d+"-"+u;var c=1e3*(n/1e3-604800),h=new Date(c),g=h.getFullYear(),l=h.getMonth()+1;l>=1&&l<=9&&(l="0"+l);var f=h.getDate();this.weekday=g+"-"+l+"-"+f;var m=1e3*(n/1e3-2592e3),p=new Date(m),v=p.getFullYear(),y=p.getMonth()+1;y>=1&&y<=9&&(y="0"+y);var _=p.getDate();this.monthday=v+"-"+y+"-"+_},chooseDate:function(e,o){if(this.loading)return!1;t.showLoading({title:"加载中..."}),this.otherday=!1,this.list=[],this.page=1,this.start_time=e,this.end_time=o,this.getList()}},onLoad:function(){this.$showLoading({type:"global",text:"加载中..."}),this.getDate(),this.start_time=this.today,this.end_time=this.today,this.getList()},onReachBottom:function(){this.page++,this.getList()}};e.default=f}).call(this,o("543d")["default"])},b55a:function(t,e,o){"use strict";o.r(e);var i=o("3162"),n=o("5de4");for(var s in n)"default"!==s&&function(t){o.d(e,t,(function(){return n[t]}))}(s);o("5dca");var a,r=o("f0c5"),d=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,"5079cd84",null,!1,i["a"],a);e["default"]=d.exports}},[["a813","common/runtime","common/vendor"]]]);