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

<view class='container' wx:hidden="{{!exhibitionDetail}}">
  <view class='zl_detail_bg'>
    <image wx:if="{{exhibitionDetail.imageUrl}}" mode="aspectFill" class='zl_detail_bg_img' src="{{imgServer + exhibitionDetail.imageUrl||defaultImg}}"></image>
  </view>
  <view class='zl_detail_info'>
    <view class='zl_detail_info_title'>
      <text class='exhibitionDetailName'>{{exhibitionDetail.name}}</text>
    </view>
    <view class='zl_detail_info_subTxt'>
      <text class='zl_detail_info_subTxt_txt'>{{exhibitionDetail.pavilionName}}</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='cg_detail_time_warpper'>
      <view class='iconfont iconriqi'></view>
      <text class='cg_detail_time'>{{exhibitionDetail.openTime}}</text>
    </view>
    <view class='cg_detail_time_warpper' wx:if="{{exhibitionDetail.openTimeDetail}}">
      <view class='iconfont iconshijian'></view>
      <text class='cg_detail_time'>{{exhibitionDetail.openTimeDetail}}</text>
    </view>
    <view class='cg_detail_time_warpper'>
      <view class='iconfont iconpiaowu'></view>
      <text class='cg_detail_time'>{{exhibitionDetail.fee||'免费'}}</text>
    </view>
    <navigator class='cg_address_warpper' hover-class='none' url="../cg_detail/cg_introduce/index?la={{exhibitionDetail.latitude}}&lo={{exhibitionDetail.longitude}}">
      <view class=' iconfont iconweizhi'></view>
      <text class='cg_address'>{{exhibitionDetail.address}}</text>
      <view class='iconfont iconkedianjibiaoshiicon'></view>
    </navigator>

    <view class='cg_detail_desc'>
      <view class='cg_detail_desc_con {{ exhibitionDetail.description ? "" : "noText"  }} '>
        <view class='zl_detail_con {{active ? "active" : ""}}'>
          <template is="wxParse" data="{{wxParseData:description.nodes}}" />
        </view>
        <text wx:if="{{!exhibitionDetail.description}}">暂无简介</text>
      </view>
      <view wx:if="{{exhibitionDetail.description}}" class='cg_detail_descMore {{ active ? "active" : ""  }}' bindtap='clickCell'>{{active ? "" : "查看更多内容" }}</view>
    </view>

  </view>
  <view class='zl_artist' wx:if="{{exhibitionDetail.pavilions.length>0}}">

    <navigator class='fdkk-cells' url="../cg_detail/index?id={{exhibitionDetail.pavilions[0].id}}">
      <view class='artist_avatar'>
        <view class='artist_avatar_item'>
          <image class='artist_avatar_img' mode='aspectFill' src="{{ imgServer + exhibitionDetail.pavilions[0].logoUrl||defaultImg}}"></image>
          <view class='pav_item'>
            <view class='pav_name'>{{exhibitionDetail.pavilions[0].name}}</view>
            <view class='cg_desc'>在展{{exhibitionDetail.pavilions[0].relatedActivitiesSize||0}}场</view>
          </view>
        </view>
        <text class='iconfont iconkedianjibiaoshiicon'></text>
      </view>
    </navigator>

  </view>
  <view class='tour_guide'>
    <view class='fdkk-cells' style='padding: 0;padding-bottom:74rpx;margin-bottom:0;'>
      <view class='weui-cell fix-padding'>
        <view class='weui-cell__bd' style='padding:0 30rpx;'>
          <text class='sub_bar_title'>热门评论</text>
          <text bindtap='tapToComement' class='write_comment'>写评论</text>
        </view>
      </view>
      <view wx:for="{{comments}}" wx:if="{{!(index>10)||readActive}}" wx:key="index" class='comments_con'>
        <view class='comments-item'>
          <view class='item-top'>
            <view class='top-avatar'>
              <image mode='aspectFill' src="{{item.avatarUrl||defaultImg}}" />
            </view>
            <view class='top-middle'>
                <view style='font-size:30rpx;'>{{item.nickName}}</view>
                <image wx:for="{{item.imgObj}}" wx:key="index" class="comment-img__item" mode='aspectFill' src="{{item.img}}"></image>
            </view>
            <view class='top-right'>
              <text>{{item.dateTimeDeatil}}</text>
            </view>
          </view>
          <view class='item-bottom'>
              <view class="bottom-detail">{{item.comment}}</view>
          </view>
        </view>
      </view>
      <!-- <view wx:for="{{comments}}" wx:if="{{!(index>10)||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-left'>
              <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">{{item.comment}}</view>
              <view class="comment-dec " bindtap='addCommentLike' data-idx="{{index}}" data-type="{{item.hasLike}}" data-id="{{item.id}}">
              </view>
            </view>
            <view class='comment-right'>
              <text>{{item.dateTimeDeatil}}</text>
            </view>
          </view>
        </view>
      </view> -->
      <view class='shensuo' wx:if="{{comments.length >= 10}}" bindtap="readMore">
        <text class="">{{readActive ? "" : "查看更多内容" }}</text>
      </view>
    </view>
  </view>
</view>