var share_count = 0; Page({ data: {}, onLoad: function(t) { this.setData({ options: t }) getApp().page.onLoad(this, t) }, onShow: function() { getApp().page.onShow(this); var e = this; var data = {}; getApp().core.showLoading({ mask: !0 }); var coupon_id = e.data.options.coupon_id if(typeof(coupon_id) != ('undefined' || undefined || null || '')){ data.coupon_id = coupon_id } getApp().request({ url: getApp().api.default.coupon_list, data: data, success: function(t) { 0 == t.code && e.setData({ coupon_list: t.data.list }) }, complete: function() { getApp().core.hideLoading() } }) }, receive: function(t) { var o = this, e = t.target.dataset.index; getApp().core.showLoading({ mask: !0 }), o.hideGetCoupon || (o.hideGetCoupon = function(t) { var e = t.currentTarget.dataset.url || !1; o.setData({ get_coupon_list: null }), e && getApp().core.navigateTo({ url: e }) }), getApp().request({ url: getApp().api.coupon.receive, data: { id: e }, success: function(t) { 0 == t.code && o.setData({ get_coupon_list: t.data.list, coupon_list: t.data.coupon_list }) }, complete: function() { getApp().core.hideLoading() } }) }, closeCouponBox: function(t) { this.setData({ get_coupon_list: "" }) }, goodsList: function(t) { var e = t.currentTarget.dataset.goods, o = []; for (var a in e) o.push(e[a].id); getApp().core.navigateTo({ url: "/pages/list/list?goods_id=" + o }) } });