<!--packageD/ActivityDetail/ActivityDetail.wxml-->
<import src="../../wxParse/wxParse.wxml" />
<view class="Activity" style="background:{{infoList.color}}">
  <div class="top_music" wx:if="{{audio_link}}" >
    <icon
      class="iconfont icon-active_music_open xuanzhuan"
      catchtap="audioPause"
      wx:if="{{!songStop}}"
    ></icon>
    <icon
      class="iconfont icon-active_music_close"
      catchtap="audioPlay"
      wx:if="{{songStop}}"
    ></icon>
  </div>
  <audio poster="" name="" author="" src="{{audio_link}}" id="myAudio" controls="{{false}}" loop ></audio>

  <view class="banner" wx:if="{{bosPto}}">
    <image src="{{infoList.background_thumb}}" mode="widthFix"></image>
  </view>
  <!-- 联盟商家 -->
  <view class="business_box">
    <view class="title">
      <view class="left"></view>
      <view class="h2">活动倒计时</view>
      <view class="right"></view>
    </view>
    <view class="title_b">
      <view class='p'>距离活动结束</view>
      <view class="orange p">{{infoList.end_date}}</view>
    </view>
    <view class="number_time">
      <view class="active_time">
        <view class="span">{{Day}}</view>
        <view class="em">天</view>
        <view class="span">{{Hour}}</view>
        <view class="em">:</view>
        <view class="span">{{Min}}</view>
        <view class="em">:</view>
        <view class="span">{{Sec}}</view>
      </view>
    </view>
    <view class="business bottom-line" wx:if="{{buy_count}}">
      <view class='p'>已购
        <view class="span">{{buy_count}}</view>人</view>
    </view>
    <view class="business">
      <view style="line-height: 2rem" class='p'>
        <view class="span">{{browse_count}}</view>人浏览</view>
    </view>
    <view class="user">
      <view class="img" wx:for="{{browse_member}}" wx:key="index" style="zIndex:{{index}};right:{{index*24+5}}px;">
        <image src="{{item.member.avatar_image}}"></image>
      </view>
    </view>
  </view>
  <!-- 最新购买列表  -->
  <view class="ranking_list" wx:if="{{infoList.order_list == 1}}">
    <view class="title">
      <view class="left"></view>
      <view class="h2">最新购买列表</view>
      <view class="right"></view>
    </view>
    <view class="business bottom-line">
      <view class="p">共
        <view class="span">{{buy_count}}</view>人参与购买</view>
    </view>
    <view class="store_list">
      <swiper autoplay="{{true}}" interval="1000" vertical="true" style="width:100%;height:100%" display-multiple-items="4" circular="{{true}}" wx:if="{{newGmBox}}">
        <block wx:for="{{orders}}" wx:key='index'>
          <swiper-item>
            <view class="header_box">
              <view class="header">
                <!-- <img :src="!fun.isTextEmpty(item.belongs_to_member)?item.belongs_to_member.avatar_image:''"> -->
                <image src="{{item.belongs_to_member.avatar_image}}"></image>
              </view>
              <view class="content">
                <view class="left">
                  <view class="name span">{{item.belongs_to_member.nickname}}</view>
                  <view class="span">{{item.belongs_to_member.mobile}}</view>
                </view>
                <view class="right">
                  <view class="money span">{{language['money']}}{{item.price}} {{item.status_name}}</view>
                  <view class="time span">{{item.create_time}}</view>
                </view>
              </view>
            </view>
          </swiper-item>
        </block>
      </swiper>
      <view wx:else>
        <block wx:for="{{orders}}" wx:key='index'>
          <view class="header_box">
            <view class="header">
              <!-- <img :src="!fun.isTextEmpty(item.belongs_to_member)?item.belongs_to_member.avatar_image:''"> -->
              <image src="{{item.belongs_to_member.avatar_image}}"></image>
            </view>
            <view class="content">
              <view class="left">
                <view class="name span">{{item.belongs_to_member.nickname}}</view>
                <view class="span">{{item.belongs_to_member.mobile}}</view>
              </view>
              <view class="right">
                <view class="money span">{{language['money']}}{{item.price}} {{item.status_name}}</view>
                <view class="time span">{{item.create_time}}</view>
              </view>
            </view>
          </view>
        </block>
      </view>
    </view>
  </view>
  <!-- 领红包排行榜  -->
  <view class="ranking_list" wx:if="{{infoList.award_list == 1}}">
    <view class="title">
      <view class="left"></view>
      <view class="h2">领取奖励列表</view>
      <view class="right"></view>
    </view>
    <view class="business bottom-line" style="text-align: center">
      <view class="p">共
        <view class="span">{{award_count}}</view>人参与
      </view>
    </view>
    <view class="store_list">
      <swiper autoplay="{{true}}" interval="1000" vertical="true" style="width:100%;height:100%" display-multiple-items="4" circular="{{true}}" wx:if="{{lingquBox}}">
        <block wx:for="{{awards}}" wx:key='index'>
          <swiper-item>
            <view class="header_box">
              <view class="header">
                <!-- <img :src="!fun.isTextEmpty(item.belongs_to_member)?item.belongs_to_member.avatar_image:''"> -->
                <image src="{{item.has_one_member.avatar}}"></image>
              </view>
              <view class="content">
                <view class="left">
                  <view class="name span">{{item.has_one_member.nickname}}</view>
                  <view class="span">{{item.has_one_member.mobile}}</view>
                </view>
                <view class="right">
                  <view class="money span">{{language['money']}}{{item.amount}} 已领取</view>
                  <view class="time span">{{item.created_at}}</view>
                </view>
              </view>
            </view>
          </swiper-item>
        </block>
      </swiper>
      <view wx:else>
        <block wx:for="{{awards}}" wx:key='index'>
          <view class="header_box">
            <view class="header">
              <!-- <img :src="!fun.isTextEmpty(item.belongs_to_member)?item.belongs_to_member.avatar_image:''"> -->
              <image src="{{item.has_one_member.avatar_image}}"></image>
            </view>
            <view class="content">
              <view class="left">
                <view class="name span">{{item.has_one_member.nickname}}</view>
                <view class="span">{{item.has_one_member.mobile}}</view>
              </view>
              <view class="right">
                <view class="money span">{{language['money']}}{{item.amount}} 已领取</view>
                <view class="time span">{{item.created_at}}</view>
              </view>
            </view>
          </view>
        </block>
      </view>
    </view>
  </view>
  <!-- 活动规则 -->
  <view class="active_rule">
    <view class="title">
      <view class="left"></view>
      <view class="h2">活动介绍</view>
      <view class="right"></view>
    </view>
    <view class="text_down">
      <!-- :class="{overhidden:!showAll}" v-html="Data.agreement" -->
      <view id="rule_text" class="{{boxShow?'noneHri':'boxHeight'}}">
        <!-- <block wx:if="{{article.nodes}}">
            <template is="wxParse" data="{{wxParseData:article.nodes}}" />
        </block> -->
        <block>
          <rich-text nodes="{{infoList.agreement}}"></rich-text>
        </block>
      </view>

    </view>
    <i class="iconfont icon-down" wx:if="{{!boxShow}}" bindtap="tapOn"></i>
    <i class="iconfont icon-up" wx:else bindtap="tapOn"></i>
  </view>
  <!-- 悬浮按钮 -->
  <view class="store_into">
    <view class="fixed-box" catchtap="getPosterImage" wx:if="{{poster_open==1}}">
      <!-- <img src="../../assets/images/my_order@2x.png" alt=""> -->
      <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/qrcode_icon.png"></image>
      <span class="text" style="color:#ff7474;">推广海报</span>
    </view>
    <view class="fixed-box">
      <!-- <img src="../../assets/images/contact@2x.png" alt=""> -->
      <view class="btns" wx:if="{{infoList.service_mobile=='' && infoList.service_qr==''}}">
        <button open-type='contact'></button>
      </view>
      <view class="btns" wx:else catchtap="setShow"></view>
      <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/contact@2x.png"></image>
      <span class="text blue">联系商家</span>
    </view>
    <view class="fixed-box" catchtap="linkToorder">
      <!-- <img src="../../assets/images/my_order@2x.png" alt=""> -->
      <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/my_order@2x.png"></image>
      <span class="text orange">我的订单</span>
    </view>
    <view class="fixed-box" catchtap="linkTomember">
      <!-- <img src="../../assets/images/my_member@2x.png" alt=""> -->
      <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/my_member@2x.png"></image>
      <span class="text yellow">会员中心</span>
    </view>
  </view>
  <!-- 底部按钮 -->
  <view class="bottom_btn" bindtap="toGoods">
    <view class="button">立即参与</view>
  </view>
</view>


<van-popup show="{{ poster_show }}" z-index="10000" custom-style="background:transparent;">
     <view class="explainWrapper">
          <view class="explainTextWrapper" catchtap="tapLoadWatch" data-img='{{poster_url}}'>
              <image src="{{poster_url}}" style="width:100%;height:100%;"></image>
          </view>
          <icon bindtap="setPosterShow" class="close iconfont icon-adsystem_icon_cancle"></icon>
     </view>
</van-popup>


<van-popup show="{{ show }}" z-index="10000" custom-style="background:transparent;">
  <view class="explainWrapper">
          <view class="contactWrapper">
            <view class="popup-head" wx:if="{{infoList.service_mobile}}">
              <!--<p>在线客服：悠悠我心</p>-->
              <view data-iphone="{{infoList.service_mobile}}" bindtap="makePhoneCall">
                <view class="green">
                  <icon class="iconfont icon-zx_map_tel"></icon>
                  <text>一键拨打</text>
                </view>
              </view>
            </view>
            <view class="qr">
              <image class="code" show-menu-by-longpress src="{{infoList.service_qr}}" />
              <text wx:if="{{infoList.service_qr!=''}}">长按识别 二维码联系我们</text>
            </view>
          </view>
          <view class="close" bindtap="setShow">
            <icon class="close iconfont icon-adsystem_icon_cancle"></icon>
          </view>
        </view>
</van-popup>

