layui.define(['carousel','form','ClipboardJS'], function(exports){
  var $ = layui.$
   ,form = layui.form
   ,ClipboardJS = layui.ClipboardJS
  ,carousel = layui.carousel;
  
  $(function(){

var clipboard = new ClipboardJS('.copycode');
clipboard.on('success', function(e) {
layer.msg('复制成功，打开【手机淘宝】即可下单！'); 
    e.clearSelection();
});
clipboard.on('error', function(e) {
layer.msg('复制失败'); 
});

  
$("#getCouponBtn").on("click",function(){
	layer.open({
		type: 1,
		title: false,
		area: '100%',
		offset: '0px',
		shadeClose: true,
		closeBtn: 0,
		scrollbar: false,
		fixed: true,
		content: $(".box-kouling"),
		skin: 'layui-layer-nobg',
		success: function(layero, index) {
			$("html,body").addClass("lock")
			$(".close-kouling").on("click", function() {
				layer.close(index)
			})
		}
	});							
});
  	
$("#silde").children("#scroll").on('click',function(){$("html,body").animate({scrollTop:0},500)}); 	

  });

  exports('tqk', {}); 
})