define(["tiny","laytpl","jquery.circliful"],function(a,b){var c={};return c.initChannel=function(){$(".myStat").circliful();var c=!1;$(document).on("infinite",".infinite-scroll",function(){var d=$(this),e=d.data("min");e&&(c||(c=!0,d.find(".infinite-scroll-preloader").removeClass("hide"),$.post(a.getUrl("wmall/channel/coupon/list"),{min:e},function(a){var e=$.parseJSON(a);if(d.attr("data-min",e.message.min),!e.message.min)return $.detachInfiniteScroll($(".infinite-scroll")),void $(".infinite-scroll-preloader").remove();d.find(".infinite-scroll-preloader").removeClass("hide");var f=$("#tpl-coupon").html();c=!1,b(f).render(e.message.message,function(a){d.find(".coupon-list").append(a),$(".myStat").not(".circliful").circliful()})})))}),$(document).ready(function(){$(".coupon-list").on("click",".button-get-coupon",function(){var b=$(this).data("id"),c=$(this).data("sid"),d=$(this);$.post(a.getUrl("wmall/channel/coupon/get"),{id:b,sid:c},function(a){var b=$.parseJSON(a);return 0!=b.message.errno?$.toast(b.message.message):($.toast(b.message.message),d.parent().parent().prev().removeClass("hide"),d.parent().parent().addClass("hide")),!1})})})},c});