<view class="comments">
  <view class="h">
    <view class="item {{ showType == 0 ? 'active' : ''}}" bindtap="switchTab">
      <view class="txt">全部({{allCount}})</view>
    </view>
    <view class="item {{ showType == 0 ? '' : 'active'}}" bindtap="switchTab">
      <view class="txt">有图({{hasPicCount}})</view>
    </view>
  </view>
  <view class="b">
    <view class="item" wx:for="{{comments}}" wx:key="id">
      <view class="info">
        <view class="user">
          <image src="{{item.userInfo.avatarUrl}}"></image>
          <text>{{item.userInfo.nickName}}</text>
        </view>
        <view class="time">{{item.addTime}}</view>
      </view>
      <view class="comment">{{item.content}}</view>
      <view class="imgs" wx:if="{{item.picList.length > 0}}">
        <image class="img" wx:for="{{item.picList}}" wx:key="*this" wx:for-item="pitem" src="{{pitem}}"></image>
      </view>
    </view>

  </view>
</view>