comment.wxml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!-- component/comment.wxml -->
  2. <scroll-view class="comment_container" scroll-y="{{isScroll}}">
  3. <view class="comment_number">评论 {{commentNum}}</view>
  4. <view class="comment_item" wx:for="{{commentList}}" data-commentid="{{item.id}}" wx:key="id">
  5. <view class="comment_box">
  6. <view class="avatar_box">
  7. <image src="{{item.avatar}}" />
  8. </view>
  9. <view class="comment_info">
  10. <text class="nickname">{{item.nickName}}</text>
  11. <text class="comment_text" space="false">{{item.text}}</text>
  12. <view class="comment_reply_wrapper" wx:if="{{item.replyCount > 0}}">
  13. <view class="comment_reply_item" wx:for="{{item.replyList}}" wx:for-item="inner" wx:if="{{index <= item.showControl}}" wx:key="id">
  14. <text class="reply_nickname">{{inner.user.wechatName}}:</text>
  15. <text class="reply_text">{{inner.content}}</text>
  16. </view>
  17. <view wx:if="{{item.replyCount > 1 && item.showControl == 0}}" catchtap="showMore" data-index="{{index}}" class="more_btn">
  18. 更多>
  19. </view>
  20. </view>
  21. <view class="time_info">
  22. <view class="time">{{item.time}}</view>
  23. <view class="info">
  24. <view class="like" bindtap="{{item.isLike? null:'likeComment'}}" data-index="{{index}}" data-likes="{{item.likes}}" data-id="{{item.id}}">
  25. <image src="{{item.isLike? '../../static/index/like_reply.png' : '../../static/index/like_reply_grey.png'}}" />
  26. <text>{{item.likes}}</text>
  27. </view>
  28. <view class="comment" bindtap="catchComment" data-index="{{index}}" data-id="{{item.id}}">
  29. <image src="../../static/index/reply_icon.png" />
  30. <text>{{item.replyCount}}</text>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <flowerBox id="flower-toast" flowerNum="{{flowerNum}}" />
  38. </scroll-view>
  39. <view class="comment_input">
  40. <input name="send_input" adjust-position="{{adjustPosition}}" bindfocus="bindfocus" bindblur="closeblur" class="send_input" confirm-type="hold" focus="{{ifGetFocus}}" value="{{inputValue}}" bindinput="textInput" bindconfirm="sendReply" placeholder="留下你的赞美,鼓励一下。" />
  41. <view class="send_btn" bindtap="sendReply">发送</view>
  42. </view>