小程序有没有ontap事件
发布于 6 年前 作者 lilong 8662 次浏览 来自 问答

之前写的一个项目,不知道在什么情况下,使用了ontap事件。但是功能都正常,模拟器、真机,包括安卓和IOS都没有问题。

和使用bindtap一模一样。

wxml :

<!--结算-->
 <view class="footer-account-box order-accounts">
   <view class="total-account">
     付款合计:¥{{account}}
   </view>
   <view wx:if="{{orderStatus<=1}}" class="pay {{!addressInfo?'disabled':''}}" ontap="pay">去付款</view>
 </view>

js:

 /*下单和付款*/
 pay:function(){
     if(!this.data.addressInfo){
        this.showTips('下单提示','请填写您的收货地址');
            return;
           }
           if(this.data.orderStatus==0){
               this._firstTimePay();
           }else{
               this._oneMoresTimePay();
           }

       },


查询了文档,也没有发现有关ontap的说明,有哪位朋友可以帮我解释一下这个问题,非常感谢。

回到顶部