<!--pages/zl_detail/index.wxml-->
<import src="../../../common/component/wxParse/wxParse.wxml" />

<view class='container'>
  <view class='zl_detail_bg'>
    <image mode="aspectFill" class='zl_detail_bg_img' src="{{exhibitionDetail.imageUrl||defaultImg}}"></image>
  </view>
  <view class='zl_detail_info'>
    <view class='zl_detail_info_title'>
      <text class='exhibitionDetailName'>{{exhibitionDetail.name}}</text>
      <view class="comment_style">
        <text>{{exhibitionDetail.score||'0.0'}}</text>
        <view>
          <image wx:for="{{show_star}}" wx:key="index" class="comment-img__item" mode='aspectFill' src="{{item.img}}"></image>
        </view>
        <!-- <text style='font-size:24rpx;color:#999;font-weight:normal'>{{exhibitionDetail.commentCount}}评论</text> -->
        <text style='font-size:24rpx;color:#999;font-weight:normal'>点评</text>
      </view>
    </view>
    <view class='zl_detail_info_subTxt'>
      <text class='iconfont icon-time'></text>
      <text class='zl_detail_info_subTxt_title'>展览时间：</text>

      <view class='zl_detail_info_subTxt_txt'>
        {{exhibitionDetail.statusTextDesp}}
        <!-- <template is="wxParse" data="{{wxParseData:openTime.nodes}}" /> -->
      </view>
    </view>
    <view class='zl_detail_info_subTxt'>
      <text class='iconfont icon-piaowu'></text>
      <text class='zl_detail_info_subTxt_title'>票务：</text>
      <text class='zl_detail_info_subTxt_txt'>{{exhibitionDetail.fee||'免费'}}</text>
      <view class="like_style">
        <text data-idx="{{index}}" data-type="{{exhibitionDetail.hasCollect}}" data-id="{{item.id}}" class="iconfont {{exhibitionDetail.hasCollect?'iconyishoucang':'iconweishoucang'}}" catchtap='addLike'>
        <!-- <text class='like-num'>{{exhibitionDetail.collectionsCount}}</text> -->
        <text class='like-status'>{{exhibitionDetail.hasCollect?'已收藏':'未收藏'}}</text>
        </text>
      </view>
    </view>
    <view class="">
      <navigator hover-class='none' url="{{'../../cg_detail/index?id='+exhibitionDetail.pavilions[0].id}}" class="weui-cell weui-cell_access" style='margin-bottom:20rpx;'>
        <view class="weui-media-box__hd">
        </view>
        <view class="weui-cell__bd">
          <image class='weui-media-box__hd_avatar' mode='widthFix' src="{{logo_img}}"></image>
        </view>
        <view class="weui-cell__ft weui-cell__ft_in-access"></view>
      </navigator>
      <view class="zl_detail_body {{active?'zl_detail_body_active':''}}">
        <view class='zl_detail_con'>
          <template is="wxParse" data="{{wxParseData:description.nodes}}" />
        </view>
      </view>
      <view class='shensuo' bindtap='clickCell'>
        <text class="iconfont icon-jiantou {{active?'icon-jiantou_active':''}}">{{active?'收起':'展开'}}</text>
      </view>
    </view>
  </view>

  <view class='tour_guide'>
    <view class='fdkk-cells' style='padding: 0;padding-bottom:30rpx'>
      <view class='weui-cell fix-padding'>
        <view class='weui-cell__bd' style='padding:0 30rpx;'>
          <text class='sub_bar_title'>热门评论</text>
        </view>
      </view>
      <view wx:for="{{comments.content}}" wx:if="{{!(index>2)||readActive}}" wx:key="index" class='comment_con'>
        <view class="weui-cell" style='align-items: flex-start;padding-bottom:30rpx;'>
          <view class="weui-cell__hd">
            <view class="weui-media-box__hd weui-media-box__hd_in-appmsg">
              <image class="weui-media-box__thumb" mode='aspectFill' src="{{item.avatarUrl||defaultImg}}" />
            </view>
          </view>
          <view class="weui-cell__bd">
            <view class="comment-username">
              <text style='font-size:30rpx;'>{{item.nickName}}</text>

            </view>
            <view>
              <image wx:for="{{item.imgObj}}" wx:key="index" class="comment-img__item" mode='aspectFill' src="{{item.img}}"></image>
            </view>
            <view class="comment-detail">
              <text style='font-size:28rpx;'>{{item.comment}}</text>
              <!-- <template is="wxParse" data="{{wxParseData:content.nodes}}" /> -->

            </view>
            <view class="comment-dec " bindtap='addCommentLike' data-idx="{{index}}" data-type="{{item.hasLike}}" data-id="{{item.id}}">
              <text>{{item.dateTimeDeatil}}</text>
              <text class="iconfont icon-zan {{item.hasLike?'icon-zan_active':''}}"><text style='margin-left:10rpx;'>{{item.likeCount}}</text></text>
            </view>
            <!-- <view class="comment-img" wx:if="{{evaluate[0].imgs.length>0}}">
              <image wx:for="{{evaluate[0].imgs}}" wx:key="{{index}}" class="comment-img__item" mode='aspectFill' src="{{item}}"></image>
            </view> -->
          </view>
        </view>
      </view>
      <view class='shensuo' bindtap="{{comments.content.length>0?'tapToCommentDetail':''}}">
        <text class="" style='color:#e02f2f'>{{comments.content.length>0?"全部评论"+'('+comments.content.length+')':"暂无评论"}}</text>
      </view>
    </view>
  </view>
  <view class='argee_con'>
    <view class='bottom-area__agree'>
      <view class="weui-agree__text">
        <checkbox-group bindchange="bindAgreeChange">
          <label for="weuiAgree">
            <checkbox id="weuiAgree" value="agree" style="transform:scale(0.7); line-height:28rpx; vertical-align: middle;" checked="{{isAgree}}">
            </checkbox>
            <text style='margin-left:-6rpx;font-size:26rpx; vertical-align: middle;'>阅读并同意</text>
            <text style='vertical-align: middle;font-size:26rpx;' catchtap='tapToDetail' hover-stop-propagation='{{true}}' class="weui-agree__link">《相关条款》</text>
          </label>
        </checkbox-group>
      </view>
    </view>
  </view>
  <view class="bottom-area">

    <view bindtap='tapToComement' class="bottom-area__info">
      <text class="iconfont icon-xiugai"></text>
      <text class='icontxt'>评论</text>
    </view>

    <view bindtap='doWeChatPay' class="bottom-area__btn">
      <text class="iconfont {{exhibitionDetail.hasPay||!exhibitionDetail.product.productPrice?'icon-view':'icon-gouwuche'}}"></text>
      <!-- <text class="iconfont icon-view"></text> -->

      <text class='icontxt'>{{exhibitionDetail.hasPay||!exhibitionDetail.product.productPrice?'观看':'购买'}}</text>
    </view>
  </view>
</view>