1. Picker选择器

json格式如[{TransactionNumber=1,VendorName="百度"},{TransactionNumber=2,VendorName="保科院"}]

      <picker bindchange="bindPickerChange" value="{{index}}" range="{{company}}" range-key="VendorName" data-id='{{type[index].TransactionNumber}}'>
        <view class="title">
          需方{{company[index].VendorName}}
        </view>
      </picker>

  js:带filter筛选

var that=this;  
    //绑定公司信息
    wx.request({
      url: app.globalData.API + 'VendorInfo',
      header: {
        "Content-Type": "applicatiSon/x-www-form-urlencoded"
      },
      method: "GET",
      success: function (res) {
        var company = res.data.filter((p)=>{
          return p.VendorType==1
        });
        var supllay = res.data.filter((p)=>{
          return p.VendorType!=1
        });
  
        that.setData({ 
          company:company,
          supllay:supllay
        })
      }

  

相关文章:

  • 2021-11-06
  • 2019-03-15
  • 2019-03-18
  • 2021-06-25
  • 2021-10-19
  • 2021-10-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-12
  • 2021-09-13
  • 2021-10-21
  • 2021-05-24
相关资源
相似解决方案