let arr = [2, 5, 8, 1, 4]

// filter 实现 返回 数组
let result = arr.filter(item => {
    return item > 10
}).length > 0

// find 实现  返回所匹配的那一项
let result = arr.find(item => {
    return item > 10
})  !== undefined

// some 实现  返回true  false
let result =  arr.some(item => {
    return item > 10
})
addChannelCart: function () {
    const that = this;
    // console.log(that.data.warehouse_id, '添加购物车==>warehouse_id')
    let result = that.data.cart_list.some(item => {
      return item.warehouse_id == that.data.warehouse_id
    })
    console.log(result, 'result')
    if (!result) {
      wx.showToast({
        title: '',
        icon: 'none'
      })
    }
    return;
    if (!wx.getStorageSync('brand_shop_id')) {
      wx.showToast({
        title: '添加购物车无brand_shop_id',
      })
    }