zoukankan      html  css  js  c++  java
  • 小程序选中传值过去 不选中默认第一个

    <!--拼餐支付 -->
    <view class='hd_faqiren'>
    <view class='font32'>拼餐支付</view>
    <view class='hd_pincan_nr df df_space color_666 font26'>
    <block wx:for="{{zhi}}" wx:key="pay">

    <view data-index='{{index}}' bindtap='pay_tabtoggle' class='pincan_list {{current_pay==index?"sel":""}}'>
    {{item.f_name}}
    </view>
    </block>
    </view>
    </view>
     
    // 拼餐支付选项
    pay_tabtoggle(e){
    let that = this;
    let dex = e.currentTarget.dataset.index;
    that.setData({
    current_pay: dex,
    })
    },
     
     
    go_pincan:function(e){
    // 去拼餐
    console.log(e)
    var c_id = e.currentTarget.dataset.c_id;
    var s_id = e.currentTarget.dataset.s_id;
    var time = this.data.date + this.data.time
    console.log(time)
    var arrs = this.data.zhi;
    var dex = this.data.current_pay;
    wx.navigateTo({
    url: '../lijipindan/lijipindan?c_id=' + c_id + "&s_id=" + s_id + "&texts=" + arrs[dex].f_name + "&time=" + time,
    })
    },
     
  • 相关阅读:
    适配器模式(Adapter)
    状态模式(State)
    观察者模式(Publish/Subscribe)
    建造者模式(Builder)
    数据库,知识点汇总
    数据库
    css样式大全
    遮罩层
    js数组冒泡
    js基本方法
  • 原文地址:https://www.cnblogs.com/isuansuan/p/9949133.html
Copyright © 2011-2022 走看看