微信小程序:bindtap方法传参

1、wxml

<view bindtap="pay_again" data-name="{{orderList.jid}}" data-fee="{{orderList.act_fee}}" data-mobile="{{orderList.p_phone}}" data-act="{{orderList.act_name}}" class="operating f_r webkit-box" style="line-height:30px;">           <a href="" class="pay bg_red">继续支付</a>       </view>

2、js

 // 再次发起支付请求,调用后台PHP  pay_again:function(e){    var that = this;    that.setData({      jid: e.currentTarget.dataset.name,      act_name: e.currentTarget.dataset.act,      act_fee: e.currentTarget.dataset.fee,      mobile: e.currentTarget.dataset.mobile    })    console.log('活动订单id = ' + that.data.mobile);  }

 

小程序

TAG标签: 微信小程序微信海外版

http://www.xiaochengxub.com/read-106531.html