<wxs src="../../utils/filter.wxs" module="filters" />
<view class="commentBox" wx:if="{{show}}">
    <!-- <view class="commentBox"> -->
    <view class="commentBg" catchtap="close" catchtouchmove="true"></view>
    <view class="comment {{tabBarPadding?'seat2':''}}" animation="{{animationData}}">
        <view class="header">
            <view class="hl {{type=='comment'?'currentH':''}}" bindtap="changeType" data-type="comment">评论
                {{count.commentNum}}
            </view>
            <view class="hl {{type=='like'?'currentH':''}}" bindtap="changeType" data-type="like">赞 {{count.likeNum}}
            </view>
            <view class=" hr" catchtap="close">×</view>
        </view>
        <scroll-view scroll-y="true" class="body" bindscrolltolower='loadMore' bindtap="cancelId">
            <view class="body-box">
                <view class="content" wx:for="{{list}}" wx:key="id" data-uid='{{item.user.uid}}' bindtap="jumpUserInfo">
                    <image src="{{item.user.avatar}}" class="c-avatar" />
                    <view class="c-right" wx:if="{{type=='comment'}}">
                        <view class="nickName">
                            {{item.user.nickName||item.user.eid}}
                        </view>
                        <view class="detailDesc" data-id='{{item.id}}' data-type='1' bind:longpress="onLongPress"
                            hover-class='hoverClass'>
                            {{item.detailDesc}}
                        </view>
                        <view class="replyList" wx:if="{{item.replyVOList.length>0}}">
                            <view class="reply" wx:for="{{item.replyVOList}}" wx:for-item="reply" wx:key='id'
                                data-parent="{{item.id}}" data-id='{{reply.id}}' data-type='2'
                                bind:longpress="onLongPress" hover-class='hoverClass2'>
                                <text class="replyTitle">{{reply.user.nickName||reply.user.eid}}</text>
                                <text class="replyContent">：{{reply.content}}</text>
                            </view>
                        </view>
                        <view class="record">
                            <view class="time">{{filters.formatDate(item.gmtCreated,3)}}</view>
                            <view class="record-right">
                                <view class="iconBox" catchtap="{{item.isLike? null:'setLike'}}" data-index="{{index}}"
                                    data-id="{{item.id}}">
                                    <image class="icon"
                                        src="{{item.isLike? '/static/like_reply.png' : '/static/like_reply_grey.png'}}" />
                                    <text>{{item.likeCount}}</text>
                                </view>
                                <view class="iconBox" catchtap="ReplyComment" data-index="{{index}}"
                                    data-id="{{item.id}}">
                                    <image class="icon" src="/static/reply_icon.png" />
                                    <text>{{item.replyCount}}</text>
                                </view>
                            </view>
                        </view>
                    </view>
                    <view class="c-like" wx:else>
                        <view class="left">
                            <view class="nickName">
                                {{item.user.nickName||item.user.eid}}
                            </view>
                            <view class="time">{{item.gmtCreated}}</view>
                        </view>
                        <view class="follow {{item.isFans?'isFans':''}}" data-user='{{item}}' catchtap="setFans"
                            wx:if="{{item.uid!=uid}}">
                            <image src="{{item.isFans?'/static/follow_2.png':'/static/follow_3.png'}}" class="character"
                                mode="" />
                            <text class="text">{{item.isFans?'已关注':'关注'}}</text>
                        </view>
                    </view>
                </view>
            </view>
        </scroll-view>
        <!-- 快捷回复 -->
        <view class=" quick" wx:if="{{quickShow&&type=='comment'}}">
            <view class="close" catchtap="quickClose">×</view>
            <view class="quickTop">
                <view class="left">留下你的赞美，鼓励一下。</view>
                <view class="right">试试下面的快捷回复吧~</view>
            </view>
            <scroll-view class="contents" scroll-x="true" enhanced show-scrollbar="{{false}}">
                <view class="remark" bindtap="quickRemark" data-remark='你读的也太棒啦！' style="background-color: #FC614E">
                    你读的也太棒啦！
                </view>
                <view class="remark" bindtap="quickRemark" data-remark='很优秀，向你学习'>
                    很优秀，向你学习
                </view>
                <view class="remark" bindtap="quickRemark" data-remark='挺好的，期待更好' style="background-color: #26B944">
                    挺好的，期待更好
                </view>
                <view class="remark" bindtap="quickRemark" data-remark='还可以，继续努力' style="background-color: #7DB2FF">
                    还可以，继续努力
                </view>
            </scroll-view>
        </view>
        <view class="footer">
            <input class="input" bindinput="bindKeyInput" value="{{detailDesc}}" placeholder="留下你的赞美，鼓励一下"
                focus="{{ifGetFocus}}" />
            <view class="submit" bindtap="sendReply">发送</view>
        </view>
    </view>
</view>