my_collect.wxml 2.3 KB
<!--pages/my_collect/my_collect.wxml-->
<view class='collectbox'>
 <view class='searchbox'>
  <view class='iconfont icon-sousuo'></view>
  <view class='search_input'>
   <input placeholder='请输入您要搜索的教案内容' placeholder-class='placeholder_input' bindinput="enterword"></input>
  </view>
 </view>



 <view class="kindnav">
    <view wx:for="{{navbar}}" data-idx="{{index}}" class="kindnav_item {{currentTab==index ? 'kindactive' : ''}}" wx:key="unique" bindtap="navbarTap" data-id="{{item.id}}">{{item}}
    </view>
</view>
</view>

<view wx:if="{{currentTab==0}}">
<view class="nodata" wx:if="{{purchased.length==0}}">暂无数据</view>

<block wx:else>
<view class='collect_item' wx:for='{{purchased}}' wx:key bindtap='detail' data-id="{{item.goods_id}}" data-free="{{item.goods_price}}">
 <view class='itemimg'>
  <image src='{{item.thumbnail}}'></image>
 </view>
 <view class='itemtxt'>
  <view>{{item.goods_name}}</view>
  <view class="categry">{{item.category_name}}</view>
  <view>浏览 {{item.hit_num}} 次</view>
  <view class='itemprice' wx:if="{{state==1}}">{{item.goods_price}}元</view>
 </view>
</view>
</block>

</view>



<view wx:if="{{currentTab==1}}">
<view class="nodata" wx:if="{{not_purchased.length==0}}">暂无数据</view>

<block wx:else>
<view class='collect_item' wx:for='{{not_purchased}}' wx:key  bindtap='detail' data-id="{{item.goods_id}}" data-free="{{item.goods_price}}">
 <view class='itemimg'>
  <image src='{{item.thumbnail}}'></image>
 </view>
 <view class='itemtxt'>
  <view>{{item.goods_name}}</view>
  <view>{{item.category_name}}</view>
  <view>浏览 {{item.hit_num}} 次</view>
  <view class='itemprice'  wx:if="{{state==1}}">{{item.goods_price}}元</view>
 </view>
</view>
</block>

</view>

<view wx:if="{{currentTab==2}}">
<view class="nodata" wx:if="{{is_video.length==0}}">暂无数据</view>

<block wx:else>
<view class='collect_item' wx:for='{{is_video}}' wx:key bindtap='detail' data-id="{{item.goods_id}}" data-free="{{item.goods_price}}">
 <view class='itemimg'>
  <image src='{{item.thumbnail}}'></image>
 </view>
 <view class='itemtxt'>
  <view>{{item.goods_name}}</view>
  <view>{{item.category_name}}</view>
  <view>浏览 {{item.hit_num}} 次</view>
  <view class='itemprice'  wx:if="{{state==1}}">{{item.goods_price}}元</view>
 </view>
</view>
</block>

</view>