<!--pages/comments/comments.wxml-->
<view>
  <!-- <block wx:for="{{comments}}" wx:key="*this" wx:for-index="index">
    <view class="comments_item">
      <view>
        <view class="align_center member_avatar">
          <image src="{{item.member_avatar}}"></image>
          <view class="f28 col333 ml20">{{item.nickname}}</view>
        </view>
      </view>
      <view class="f24 col333 l_height34 mt20">{{item.content}}</view>
      <view class="f24 col999 l_height34 mt10" wx:if="{{item['transform_addtime']}}">{{item['transform_addtime']}}</view>
    </view>
    <view class="place-bacd9" wx:if="{{index < comments.length - 1}}"></view>
  </block> -->

  <!-- <view class="comment comment-1px-b" wx:for="{{comments}}" wx:for-index="index" wx:key="index"> -->
  <block wx:for="{{comments}}" wx:for-index="index" wx:key="index">
    <view class="comment">
      <view class="comments_item pos_rel">
        <view>
          <view class="align_center member_avatar">
            <image src="{{item.member_avatar}}"></image>
            <view class="f28 col333 ml20">{{item.nickname}}</view>
          </view>
        </view>
        <view class="scores">
          <view class="align_center">
            <image wx:for="{{item.starSrcs}}" wx:for-index="idx" wx:key="idx" wx:for-item="calcSrc" class="star" src="{{calcSrc}}"></image>
          </view>
          <view class="comment_time mr6 mt10" wx:if="{{item['transform_addtime']}}">{{item['transform_addtime']}}</view>
        </view>
        <view class="f24 col333 l_height34 mt20">{{item.content}}</view>
        <view class="f24 col333 l_height34 mt20">规格:{{item.goods_spec}}</view>
        <view wx:if="{{item.images.length}}">
            <view class="content_img" bindtap='showCarousel' data-images="{{item.images}}" data-current="{{imgIndex}}" wx:for-item="imgItem" wx:for="{{item.images}}" wx:for-index="imgIndex" wx:key="imgIndex">
              <view class="align_center" style="width: 100%;height: 100%;">
                <image mode="widthFix" class="content_src_img" src="{{imgItem}}"></image>
              </view>
            </view>
          </view>
        <!-- <view wx:if="{{item.images.length}}">
          <image bindtap='showCarousel' mode="widthFix" data-images="{{item.images}}" data-current="{{imgIndex}}" class="content_img"
            src="{{imgItem}}" wx:for-item="imgItem" wx:for="{{item.images}}" wx:for-index="imgIndex" wx:key="imgIndex"></image>
        </view> -->
        <view class="content" wx:if="{{item.explain}}">掌柜回复：{{item.explain}}</view>
      </view>
    </view>
    <view class="place-bacd9" wx:if="{{index < comments.length - 1}}"></view>
  </block>


  <!-- <view class="comment comment-1px-b" wx:for="{{comments}}" wx:for-index="index" wx:key="index">
    <view class="user">
      <view class="member_avatar f_left">
        <image src="{{item.member_avatar}}">
        </image>
      </view>
      <view class="f28 f_left">{{item.nickname}}</view>
      <view class="scores f_right">
        <view class="flex-stars">
          <image wx:for="{{item.scores}}" wx:for-index="idx" wx:key="idx" class="star" src="../../image/star.png"></image>
        </view>
        <view class="comment_time">{{addtimes[index]}}</view>
      </view>
    </view>
    <view class="spec">规格:{{item.goods_spec}}</view>
    <view class="content">{{item.content}}</view>
    <view wx:if="{{item.images.length}}">
      <image bindtap='showCarousel' mode="widthFix" data-images="{{item.images}}" data-current="{{imgIndex}}" class="content_img" src="{{imgItem}}" wx:for-item="imgItem" wx:for="{{item.images}}" wx:for-index="imgIndex" wx:key="imgIndex"></image>
    </view>
    <view class="content" wx:if="{{item.explain}}">{{item.explain}}</view>
  </view> -->
  <commentsCarousel wx:if="{{show_carousel}}" bind:hideCarousel="hideCarousel" current="{{current}}" carouselImgs="{{carouselImgs}}">
  </commentsCarousel>
</view>