<!--packageI/cps/cpsSearchPage/cpsSearchPage.wxml-->
<view id="cpsSearchPage">
  <van-search shape="round" value="{{ searchKey }}" placeholder="请输入搜索关键词" use-action-slot bind:change="onChange" bind:search="onSearch">
    <view slot="action" bind:tap="onSearch" style="color: #e64a40;">搜索</view>
  </van-search>
  <view class="tabs">
    <block wx:if="{{!channel_type}}">
      <van-tabs active="{{ searchActive }}" bind:click="onSearch" sticky>
        <van-tab title="拼多多" name="pdd">
          <view class="listbox">
            <cpslist datas="{{goodsData}}" ratio_data="{{ratio_data}}"></cpslist>
          </view>
        </van-tab>
        <van-tab title="京东" name="jd">
          <view class="listbox">
            <cpslist datas="{{goodsData}}" ratio_data="{{ratio_data}}"></cpslist>
          </view>
        </van-tab>
      </van-tabs>
    </block>

    <block wx:if="{{channel_type}}">
      <view class="listbox">
        <cpslist datas="{{goodsData}}" ratio_data="{{ratio_data}}"></cpslist>
      </view>
    </block>

  </view>
  <view wx:if="{{goodsData.length <=0}}" style="text-align: center;padding: 20px;">
    暂无数据
  </view>
</view>
