index.wxml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!-- 分类tab -->
  2. <view class="header">
  3. <scroll-view scroll-x scroll-left style="height: 100%;">
  4. <view class="cs {{ category_id == 0 ? 'active' : '' }}" catchtap="onSwitchTab" data-id="0">
  5. <text>全部</text>
  6. </view>
  7. <!-- 分类列表 -->
  8. <view class="cs {{ item.category_id == category_id ? 'active' : '' }}" catchtap="onSwitchTab" wx:for="{{ categoryList }}" wx:key="this" data-id="{{ item.category_id }}">
  9. <text>{{ item.name }}</text>
  10. </view>
  11. </scroll-view>
  12. </view>
  13. <!-- 文章列表 -->
  14. <view class="article-list">
  15. <scroll-view bindscrolltolower="bindDownLoad" scroll-y style="height: {{scrollHeight}}px;">
  16. <view class="article-item show-type__{{ item.show_type }}" wx:for="{{ articleList.data }}" wx:key="this" catchtap="onTargetDetail" data-id="{{ item.article_id }}">
  17. <!-- 小图模式 -->
  18. <block wx:if="{{ item.show_type == 10 }}">
  19. <view class="article-item__left flex-box">
  20. <view class="article-item__title twolist-hidden">
  21. <text class="dis-block f-30 col-3">{{ item.article_title }}</text>
  22. </view>
  23. <view class="article-item__footer m-top10">
  24. <text class="article-views f-24 col-8">{{ item.show_views }}次浏览</text>
  25. </view>
  26. </view>
  27. <view class="article-item__image">
  28. <image mode="widthFix" src="{{ item.image.file_path }}"></image>
  29. </view>
  30. </block>
  31. <!-- 大图模式 -->
  32. <block wx:if="{{ item.show_type == 20 }}">
  33. <view class="article-item__title twolist-hidden">
  34. <text class="dis-block f-30 col-3">{{ item.article_title }}</text>
  35. </view>
  36. <view class="article-item__image m-top20">
  37. <image mode="widthFix" src="{{ item.image.file_path }}"></image>
  38. </view>
  39. <view class="article-item__footer m-top10">
  40. <text class="article-views f-24 col-8">{{ item.show_views }}次浏览</text>
  41. </view>
  42. </block>
  43. </view>
  44. <view wx:if="{{ no_more }}" class="no-more f-30">亲, 没有更多了</view>
  45. <!-- 无数据提供的页面 -->
  46. <view wx:if="{{ !isLoading && !articleList.data.length }}">
  47. <view class="yoshop-notcont">
  48. <text class="iconfont icon-wushuju"></text>
  49. <text class="cont">亲,暂无内容哦</text>
  50. </view>
  51. </view>
  52. </scroll-view>
  53. </view>