require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/activity/new_customer/index"],{"1bf7":function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("f076");i(n("3240"));var o=i(n("68a9"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"32aa":function(t,e,n){"use strict";n.r(e);var i=n("6b8d"),o=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=o.a},"5fda":function(t,e,n){},"644e":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.info.register_give_coupon?t.info.register_give_coupon.length:null),i=t.info.register_give_coupon&&n?t.__map(t.showMore?t.info.register_give_coupon:t.info.register_give_coupon.slice(0,6),(function(e,n){var i=t.__get_orig(e),o=1!=e.coupon_type?parseFloat(e.coupon_price):null,r=t._f("typeFilter")(e.applicable_type);return{$orig:i,m0:o,f0:r}})):null,o=t.info.register_give_coupon&&n?t.info.register_give_coupon.length:null,r=t.info.first_order_status?parseFloat(t.info.first_order_discount)/10||10:null,a=t.newList.length;t.$mp.data=Object.assign({},{$root:{g0:n,l0:i,g1:o,m1:r,g2:a}})},o=[]},"68a9":function(t,e,n){"use strict";n.r(e);var i=n("644e"),o=n("32aa");for(var r in o)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(r);n("95fa");var a=n("828b"),c=Object(a["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=c.exports},"6b8d":function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("7ca3")),r=n("b0fe"),a=n("92f9"),c=n("5088"),u=n("8f59"),s=n("4d38");function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){(0,o.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d=t.getWindowInfo().statusBarHeight,g={components:{countDown:function(){n.e("components/countDown/index").then(function(){return resolve(n("1706"))}.bind(null,n)).catch(n.oe)},NavBar:function(){n.e("components/NavBar").then(function(){return resolve(n("a7d8"))}.bind(null,n)).catch(n.oe)},baseDrawer:function(){n.e("components/tui-drawer/tui-drawer").then(function(){return resolve(n("af01"))}.bind(null,n)).catch(n.oe)}},data:function(){return{sysHeight:d,imgHost:s.HTTP_REQUEST_URL,info:{},newList:[],loading:!1,loadend:!1,loadTitle:"加载更多",page:1,limit:9,showMore:!1,pageScrollStatus:!1,rule:"",showDrawer:!1}},filters:{typeFilter:function(t){return{0:"通用券",1:"品类券",2:"商品券",3:"品牌券"}[t]}},watch:{isLogin:{handler:function(t,e){t&&(this.getNewcomerInfo(),this.productList())},deep:!0}},computed:f(f({},(0,u.mapGetters)(["isLogin","uid"])),{},{headerBg:function(){return"url("+this.imgHost+"/statics/images/newcomer/header.png)"}}),onLoad:function(){this.getNewcomerInfo(),this.productList(),this.getAgreeContent()},onPageScroll:function(t){t.scrollTop>80?this.pageScrollStatus=!0:t.scrollTop<80&&(this.pageScrollStatus=!1)},methods:{goAgree:function(){this.showDrawer=!this.showDrawer},getAgreeContent:function(){var t=this;(0,a.getUserAgreement)("newcomer_agreement").then((function(e){t.rule=e.data.content})).catch((function(t){that.$util.Tips({title:t.msg})}))},getNewcomerInfo:function(){var t=this;(0,r.newcomerInfo)().then((function(e){e.data.last_time=parseInt(e.data.last_time),t.info=e.data})).catch((function(e){t.$util.Tips({title:e})}))},productList:function(){var t=this,e=this;e.loading||e.loadend||(e.loading=!0,e.loadTitle="",(0,r.newcomerList)({page:e.page,limit:e.limit}).then((function(t){var n=t.data,i=n.length<e.limit;e.newList=e.$util.SplitArray(n,e.newList),e.$set(e,"newList",e.newList),e.loadend=i,e.loadTitle=i?"没有更多内容啦~":"加载更多",e.page=e.page+1,e.loading=!1})).catch((function(n){e.loading=!1,e.loadTitle="加载更多",t.$util.Tips({title:n})})))},goPage:function(e,n){this.isLogin?1==n?t.navigateTo({url:e}):3==n&&t.navigateBack():(0,c.toLogin)()},showMoreChange:function(){this.showMore=!this.showMore}},onReachBottom:function(){this.productList()},onShareAppMessage:function(){return{title:"新人礼",path:"/pages/activity/new_customer/index?spid="+this.uid}},onShareTimeline:function(){return{title:"新人礼",path:"/pages/activity/new_customer/index?spid="+this.uid}}};e.default=g}).call(this,n("df3c")["default"])},"95fa":function(t,e,n){"use strict";var i=n("5fda"),o=n.n(i);o.a}},[["1bf7","common/runtime","common/vendor"]]]);