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); }
原文链接:https://www.cnblogs.com/xuzhengzong/p/7169503.html
标签:传参,fee,name,mobile,dataset,currentTarget,act,方法,bindtap 来源: https://www.cnblogs.com/cyfeng/p/16091928.html