123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <!-- component/comment.wxml -->
- <scroll-view class="comment_container" scroll-y="{{isScroll}}">
- <view class="comment_number">评论 {{commentNum}}
- </view>
- <view class="comment_item" wx:for="{{commentList}}" data-commentid="{{item.id}}" wx:key="id">
- <view class="comment_box">
- <view class="avatar_box">
- <image src="{{item.avatar}}" />
- </view>
- <view class="comment_info">
- <text class="nickname">{{item.nickName}}</text>
- <text class="comment_text" space="false">{{item.text}}</text>
- <view class="comment_reply_wrapper" wx:if="{{item.replyCount > 0}}">
- <view class="comment_reply_item" wx:for="{{item.replyList}}" wx:for-item="inner" wx:if="{{index <= item.showControl}}" wx:key="id">
- <text class="reply_nickname">{{inner.user.nickName}}:</text>
- <text class="reply_text">{{inner.content}}</text>
- </view>
- <view wx:if="{{item.replyCount > 1 && item.showControl == 0}}" catchtap="showMore" data-index="{{index}}" class="more_btn">
- 更多>
- </view>
- </view>
- <view class="time_info">
- <view class="time">{{item.time}}</view>
- <view class="info">
- <view class="like" bindtap="{{item.isLike? null:'likeComment'}}" data-index="{{index}}" data-likes="{{item.likes}}" data-id="{{item.id}}">
- <image src="{{item.isLike? '../../static/index/like_reply.png' : '../../static/index/like_reply_grey.png'}}" />
- <text>{{item.likes}}</text>
- </view>
- <view class="comment" bindtap="catchComment" data-index="{{index}}" data-id="{{item.id}}">
- <image src="../../static/index/reply_icon.png" />
- <text>{{item.replyCount}}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- <view class="comment_input">
- <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="留下你的赞美,鼓励一下。" />
- <view class="send_btn" bindtap="sendReply">发送</view>
- </view>
|