<!--pages/add/index.wxml-->
<view>
  <view class="padding">
    <t-search placeholder="请输入植物名称..." shape="round" bind:change="search" />
  </view>
  <view wx:if="{{list.length === 0}}">
    <view class="font-14 bold padding">热门植物</view>
    <view>
      <view class="grid">
        <view wx:for="{{hotList}}" style="background-color: #F6F8FE; border-radius: 16rpx;">
          <view class="item" data-id="{{item.id}}"  bind:tap="goInfo">
            <image class="pic" src="{{item.oss.url}}" mode="aspectFill"></image>
          </view>
          <view style="padding: 16rpx 16rpx 16rpx 10rpx;" class="font-12 bold">{{item.name}}</view>
        </view>
      </view>
    </view>
  </view>
  <!-- 搜索列表 -->
  <view>
    <scroll-view scroll-y="{{true}}">
      <view wx:for="{{list}}">
        <view class=" flex flex-center flex-justify-start" style="padding: 16rpx 32rpx;"  data-id="{{item.id}}" bind:tap="goInfo">
          <image class="pic1" mode="aspectFill" src="{{item.oss.url}}"></image>
          <view style="padding-left: 16rpx;">
            <view class="font-14 bold">{{item.name}}</view>
            <view class="font-14 grey">{{item.aliases}}</view>
          </view>
        </view>
      </view>
    </scroll-view>
  </view>
</view>