index.wxml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <navbar parameter='{{parameter}}'></navbar>
  2. <view class='newsList'>
  3. <view class='swiper' wx:if="{{imgUrls.length > 0}}">
  4. <swiper indicator-dots="true"
  5. autoplay="{{autoplay}}" circular="{{circular}}" interval="{{interval}}" duration="{{duration}}" indicator-color="rgba(102,102,102,0.3)" indicator-active-color="#666">
  6. <block wx:for="{{imgUrls}}" wx:key='index'>
  7. <swiper-item>
  8. <navigator url="/pages/news_details/index?id={{item.id}}">
  9. <image src="{{item.image_input[0]}}" class="slide-image"/>
  10. </navigator>
  11. </swiper-item>
  12. </block>
  13. </swiper>
  14. </view>
  15. <view class='nav' wx:if="{{navList.length > 0}}">
  16. <scroll-view class="scroll-view_x" scroll-x scroll-with-animation scroll-left="{{scrollLeft}}" style="width:auto;overflow:hidden;">
  17. <block wx:for="{{navList}}" wx:key='index'>
  18. <view class='item {{active==item.id?"on":""}}' data-id="{{item.id}}" bindtap='tabSelect'>
  19. <view>{{item.title}}</view>
  20. <view class='line bg-color' wx:if='{{active==item.id}}'></view>
  21. </view>
  22. </block>
  23. </scroll-view>
  24. </view>
  25. <view class='list'>
  26. <block wx:for="{{articleList}}" wx:key='index'>
  27. <navigator url='/pages/news_details/index?id={{item.id}}' hover-class='none' class='item acea-row row-between-wrapper' wx:if="{{item.image_input.length == 1}}">
  28. <view class='text acea-row row-column-between'>
  29. <view class='name line2'>{{item.title}}</view>
  30. <view>{{item.add_time}}</view>
  31. </view>
  32. <view class='pictrue'><image src='{{item.image_input[0]}}'></image></view>
  33. </navigator>
  34. <navigator url='/pages/news_details/index?id={{item.id}}' hover-class='none' class='item' wx:elif="{{item.image_input.length == 2}}">
  35. <view class='title line1'>{{item.title}}</view>
  36. <view class='picList acea-row row-between-wrapper'>
  37. <block wx:for="{{item.image_input}}" wx:key='index' wx:for-item="itemImg">
  38. <view class='pictrue'><image src='{{itemImg}}'></image></view>
  39. </block>
  40. </view>
  41. <view class='time'>{{item.add_time}}</view>
  42. </navigator>
  43. <navigator url='/pages/news_details/index?id={{item.id}}' hover-class='none' class='item' wx:elif="{{item.image_input.length > 2}}">
  44. <view class='title line1'>{{item.title}}</view>
  45. <view class='picList on acea-row row-between-wrapper'>
  46. <block wx:for="{{item.image_input}}" wx:key='index' wx:for-item="itemImg">
  47. <view class='pictrue'><image src='{{itemImg}}'></image></view>
  48. </block>
  49. </view>
  50. <view class='time'>{{item.add_time}}</view>
  51. </navigator>
  52. </block>
  53. </view>
  54. </view>
  55. <view class='noCommodity' wx:if="{{articleList.length == 0 && (page != 1 || active== 0)}}">
  56. <view class='pictrue'><image src='/images/noNews.png'></image></view>
  57. </view>
  58. <home></home>