index.wxml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <block wx:if="{{garden_id}}">
  2. <view class="containt">
  3. <block wx:if="{{article_list.length>0}}">
  4. <block wx:for="{{article_list}}" wx:key="id">
  5. <view class="article">
  6. <view class="article_title">
  7. <image src="{{item.user_icon}}" />
  8. <view class="article_name">
  9. <view class="deleteIcon">
  10. <text class="nick_name">{{item.nick_name}}</text>
  11. </view>
  12. <text class="article_create_at">{{item.created_at}}</text>
  13. </view>
  14. </view>
  15. <view style="padding: 20rpx 0;margin:20rpx 0;display: flex;flex-direction: column;" data-item="{{item}}">
  16. <text style="width: 100%;">{{item.content}}</text>
  17. <view class="article_pics">
  18. <block wx:for="{{item.pics}}" wx:key="index" wx:for-item="key">
  19. <image wx:if="{{key}}" src="{{key}}" bindtap="previewImage" data-index="{{index}}" id="{{item.id}}" />
  20. </block>
  21. </view>
  22. </view>
  23. <view class="article_likes">
  24. <view class="align">
  25. <block wx:for="{{class_list}}" wx:key="class_name" wx:for-item="name">
  26. <image wx:if="{{item.class_id==name.id}}" src="{{name.class_pic}}" />
  27. <text wx:if="{{item.class_id==name.id}}">{{name.class_name}}</text>
  28. </block>
  29. </view>
  30. <view class="counts">
  31. <view class="align" bindtap="goDetail" data-item="{{item}}">
  32. <image src="http://ro7r875ut.hn-bkt.clouddn.com/liaotian1.png" />
  33. <text class="comment_count">{{item.comment_count}}</text>
  34. </view>
  35. <view class="align" wx:if="{{item.like}}" bindtap="like" data-like="{{item.like}}" data-like_id="{{item.id}}" data-like_type="1">
  36. <image src="http://ro7r875ut.hn-bkt.clouddn.com/yidianzan.png" />
  37. <text>{{item.likes}}</text>
  38. </view>
  39. <view class="align" wx:else="" bindtap="like" data-like="{{item.like}}" data-like_id="{{item.id}}" data-like_type='1'>
  40. <image src="http://ro7r875ut.hn-bkt.clouddn.com/dianzan.png" />
  41. <text>{{item.likes}}</text>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </block>
  47. </block>
  48. <block wx:else="">
  49. <nodata />
  50. </block>
  51. </view>
  52. <view class="addPic">
  53. <image src="http://ro7r875ut.hn-bkt.clouddn.com/-.png" bindtap="goAddArticle" />
  54. </view>
  55. </block>
  56. <block wx:else="">
  57. <nopermission />
  58. </block>
  59. <tabbar tabbar="{{tabbar}}" unreadCount="{{unreadCountNeig}}">
  60. </tabbar>