<view class="ert" bindtap="search">
  <view class="inputContent">
    <van-icon name="search" style="margin-left: 20rpx;" />
    <input type="text" value="{{shoopingtext}}" bindinput="shoppinginput" bindconfirm="onInput" placeholder="搜索商品名称" />
    <button bindtap="onInput">搜索</button>
  </view>
</view>
<view bindtap="delete">
  <view style="color: #A9A9A9; display: flex; justify-content: space-between; margin-top: 24rpx;">
    <view style="margin-left: 60rpx;">
      <text>搜索历史</text>
    </view>
    <view style="margin-right: 40rpx; display: flex;">
      <van-icon name="/../../images/shanchu.svg" />
      <view style="margin-top: -2rpx;">
        <text style="font-size: 10px;">清除记录</text>
      </view>
    </view>

  </view>
  <view class="history_text">
    <text wx:for="{{newArray}}" wx:key="key" data-text="{{item}}" bindtap="textfz">{{item}}</text>
  </view>
</view>
<view style="margin-top: 200rpx;" wx:if="{{!show}}">
  <van-empty class="custom-image" image="/../images/chaxun.svg" description="没有匹配到结果！" />
</view>

<view wx:else>
  <view wx:for="{{list}}" wx:key="id">
    <view class="card2">
      <view style="position: relative;">
        <image style="width: 220rpx;height: 160rpx; margin:35rpx 0 0 0rpx;" src="../../images/tupian2.png" mode="" />
        <view wx:if="{{item.id ==2}}" class="if">休息中
        </view>
      </view>
      <view>
        <view style="margin:26rpx 0 0 0rpx; font-weight: 500; width: 460rpx;">
          <text>二食堂二楼麻辣烫麻辣香锅...</text>
        </view>
        <view style="font-size: 12px; width: 480rpx;display: flex; margin-top: 10rpx;">
          <view>
            <text style="color:#A9A9A9; margin-left: 25rpx;">起送</text>
            <text style="color: #FF8C00; margin-left: 6rpx;">￥15</text>
            <text style="color:#A9A9A9; margin-left: 12rpx;">货到付款</text>
            <text style="color:#A9A9A9; margin-left: 16rpx;">月售</text>
            <text style="color:#FF8C00; margin-left: 8rpx;">231</text>
          </view>
          <view style="margin-left: 20rpx;">
            <van-tag color="#FF8C00">30分钟</van-tag>
          </view>
        </view>
        <view style="display: flex; width: 446rpx; height: 30rpx; background-color: #FFDEAD; color: orange;margin: 56rpx 0 0 20rpx;">
          <van-icon style="margin-left: 120rpx;" name="/../../images/jinqian.svg" />
          <text style="display: block; font-size: 12px;margin-left: 30rpx; text-align: center;line-height: 30rpx;">积分抵扣有优惠</text>
        </view>
      </view>
    </view>
  </view>
</view>