jquery绑定事件

$(function(){
   //团过券鼠标经过效果
   $("#cert_groupon_info_list").on({
      mouseover: function(){
         if(!$(this).hasClass("cur")){
            $(this).stop().animate({"margin-left":"-40px"}, 100);     
         }
      },
      mouseleave: function(){
         if(!$(this).hasClass("cur")){
            $(this).stop().animate({"margin-left":"0"}, 100);  
         }
      },
      click: function(){
          var me = $(this);
         /**********页面效果start*************/
         gouponAnimate();
         
         /**********页面效果end*************/
         //获取选中的要支付的影票
         var ticketObj = $('#cert_ticket_list_info tr').filter('.cur');
         if(ticketObj.length>0){
            ticketObj = ticketObj.eq(0);
            //获取政策ID
            var policyid = ticketObj.find('[policyid]').attr('policyid');
            //当支付的列表中已有券支付时,只有现金券可重复用券支付
            if(policyid==""||(policyid!=""&&
               $(this).attr('ticketcoupontype')=='CASH_COUPON'&&
               //可多张使用
               $(this).attr('ticketcouponrulevalue')=='2'&&
               //必须是同一种政策
               //$(this).attr('couponid')==ticketObj.find('[policyid]').attr('policyid')
               //必须是同一种政策
               ticketObj.find('[policyid]').attr('policyid').indexOf($(this).attr('couponid'))>=0
            ))
            {
                  var conObj = {
                        couponid:$(this).attr('couponid'),
                         policysnapshotid:$(this).attr('policysnapshotid'),
                        name:$(this).attr('name'),
                        couponvalue:$(this).attr('couponvalue'),
                        ticketcouponrulevalue:$(this).attr('ticketcouponrulevalue')
                  }; 
                  //现金
                  if($(this).attr('ticketcoupontype')=='CASH_COUPON'){
                     cashPay(conObj,ticketObj);
                  //打折
                  }else if($(this).attr('ticketcoupontype')=='DISCOUNT_COUPON'){
                     discountPay(conObj,ticketObj);
                  //兑换
                  }else if($(this).attr('ticketcoupontype')=='EXCHANGE_COUPON'){
                     exchangePay(conObj,ticketObj);
                  //vip
                  }else if($(this).attr('ticketcoupontype')=='VIP_COUPON'){
                     vipPay(conObj,ticketObj);
                  }
            }else{
               new_confirm('您选择的影票已选择支付方式,是否清除原支付方式,进行重新支付?','warn',function(){
                  resetTicketPayInfo(ticketObj);
                  me.click();
               });
            }
            //修改总价
            updateConpoySumPayInfo();
         }else{
            new_alert("请选择要支付的影票",'error');
         }
         //<a href="javascript:;" class="delete"></a>
      }
   },'p');
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值