<!--packageD/businessActivity/businessActivity.wxml-->
<view id="Activity" style="background:{{Data.color}}">
  <view class="content_box">
    <view class="top_music" wx:if="Data.audio_link" >
      <icon class="iconfont icon-active_music_open xuanzhuan" catchtap="play" data-info="plays" wx:if="{{!songStop}}"></icon>
      <icon class="iconfont icon-active_music_close" catchtap="play" data-info="stop" wx:if="{{songStop}}"></icon>
    </view>
    <!-- <audio id="audio" ref="audio" loop="loop" @loadedmetadata="onLoadedmetadata" controls="controls" autoplay preload :src="Data.audio_link" style="display:none"></audio> -->
    <view class="banner">
      <!-- <a :href="Data.link2"> -->
      <image catchtap="gobannerlink" src="{{Data.thumb}}" mode="widthFix"></image>
      <!-- </a> -->
    </view>
    <view class="p member-people">
      <view class="span">已参加活动人数{{ member_count }}人</view>
    </view>
    <view class="number_time" wx:if="{{timeShow == 1}}">
      <view class="p active_time" wx:if="{{!stop}}">
        活动倒计时：
        <view class="span">{{ Day }}</view>天
        <view class="span">{{ Hour }}</view>时
        <view class="span">{{ Min }}</view>分
        <view class="span">{{ Sec }}</view>秒
      </view>
      <view class="p active_time" wx:if="{{stop}}">
        <view class="span">活动已结束</view>
      </view>
    </view>
    <!-- 联盟商家 -->
    <view class="business_box" wx:if="{{Data.is_store == 1}}">
      <view class="title">
        <view class="left"></view>
        <view class="h2">
          <!-- {{ fun.isTextEmpty(Data.s_name) ? "联盟商家" : Data.s_name }} -->
          {{ Data.s_name ? Data.s_name : "联盟商家" }}
        </view>
        <view class="right"></view>
      </view>
      <view class="p title_b">商家排名不分前后</view>
      <view class="business">
        <!-- <van-swipe :loop="true" :autoplay="4000" :width="fun.getPhoneEnv() == 3 ? 375 : clientWidths"> -->
        <swiper>
          <block wx:for='{{business}}' wx:key="index">
            <swiper-item>
              <view class="user_box">
                <view class="user" data-val="{{list}}" catchtap="toPage" wx:for="{{business[0]}}" wx:key='ind' wx:for-item="list">
                  <view class="img">
                    <image src="{{list.change_thumb}}"></image>
                  </view>
                  <view class="span">{{ list.store_name || list.hotel_name }}</view>
                </view>
              </view>
            </swiper-item>
          </block>
        </swiper>
      </view>
    </view>
    <!-- 活动规则 -->
    <view class="active_rule" wx:if="{{Data.is_rule == 1}}">
      <view class="title">
        <view class="left"></view>
        <view class="h2">
          {{ fun.isTextEmpty(Data.rule_name) ? "活动规则" : Data.rule_name }}
        </view>
        <view class="right"></view>
      </view>
      <view class="text_down">
        <!-- <view class="rule_text" :class="{ overhidden: !showAll }" v-html=" !fun.isTextEmpty(Data.rule_content)? replace(Data.rule_content)
                  : ''
             ">
          </div> -->
        <view class="rule_text" style="height:{{showAll?'':'300rpx'}}">
          <rich-text nodes="{{Data.rule_content}}"></rich-text>
        </view>
        <icon class="iconfont icon-down" wx:if="{{!showAll}}" catchtap="showAlltap"></icon>
        <icon class="iconfont icon-up" wx:if="{{showAll}}" catchtap="showAlltap"></icon>
      </view>
    </view>
    <!-- 免单详情 -->
    <view class="free_detail" wx:if="{{Data.is_wheel == 1}}">
      <view class="title">
        <view class="left"></view>
        <view class="h2">
          {{ fun.isTextEmpty(Data.wheel_name) ? "免单详情" : Data.wheel_name }}
        </view>
        <view class="right"></view>
      </view>
      <view class="list_box">
        <swiper vertical="{{false}}" autoplay="true" wx:if="{{wheels.length >0}}">
          <block wx:for='{{wheels}}' wx:key="index">
            <swiper-item>
              <view class="store_info" catchtap="gomiandan" data-info="{{item}}">
                <view class="top">
                  <view class="img">
                    <!-- wx:if="{{!item.has_one_store}}" -->
                    <image src="{{item.has_one_store.change_thumb}}" wx:if="{{item.showStore}}"></image>
                    <image src="{{item.has_one_hotel.change_thumb}}" wx:else></image>
                  </view>
                  <view class="info ul">
                    <view class="li">
                      <icon class="iconfont icon-service_l"></icon>
                      <view class="span">{{ item.has_one_store.store_name }}
                      </view>
                      <view class="span">{{ item.has_one_hotel.hotel_name }}
                      </view>
                    </view>
                    <view class="li">
                      <icon class="iconfont icon-service_m"></icon>
                      <view>{{ item.has_one_store.mobile }}
                      </view>
                      <view>{{ item.has_one_hotel.mobile }}
                      </view>
                    </view>
                    <view class="li">
                      <icon class="iconfont icon-service_n"></icon>
                      <view >{{ item.has_one_store.address }}
                      </view>
                      <view >{{ item.has_one_hotel.address }}
                      </view>
                    </view>
                  </view>
                  <view class="top_right">
                    {{ index + 1 }}/{{ wheels.length }}
                  </view>
                </view>
                <view class="store_banner">
                  <!-- <a :href="item.link"> -->
                  <image src="{{item.thumb}}"></image>
                  <!-- </a> -->
                </view>
              </view>
            </swiper-item>
          </block>
        </swiper>
      </view>
      <view class="look_detail">
        <view class="look_left"></view>
        <view class="h2" style="margin: 0 30rpx;font-size: 14px;">点击查看详情</view>
        <view class="look_left"></view>
      </view>
      <view class="look_bottom">
        <view class="left" style="margin-left: 20rpx;"></view>
        <view class="right" style="margin-right: 20rpx;"></view>
      </view>
    </view>
    <!-- 领红包排行榜 -->
    <view class="ranking_list" wx:if="{{Data.is_ranking == 1}}">
      <view class="title">
        <view class="left"></view>
        <view class="h2">
          <!-- {{ fun.isTextEmpty(Data.ranking) ? "佣金排行" : Data.ranking }} -->
          {{Data.ranking?Data.ranking:"佣金排行"}}
        </view>
        <view class="right"></view>
      </view>
      <view class="store_list" ref="store">
        <swiper vertical="{{true}}" autoplay="true">
          <block wx:for='{{commission_amount}}' wx:key="index">
            <swiper-item>
              <view class="header_box">
                <view class="header">
                  <!-- !fun.isTextEmpty(item.member) ? item.member.avatar : '' -->
                  <image src="{{item.member.avatar_image}}"></image>
                </view>
                <!-- !fun.isTextEmpty(item.member) ? item.member.nickname : ""  -->
                <view class="span name">{{item.member.nickname }}
                </view>
                <view class="span right">{{ item.total }}</view>
              </view>
            </swiper-item>
          </block>
        </swiper>
      </view>
    </view>
    <!-- 悬浮按钮 -->
    <view class="store_into" catchtap="linkTo">
      <view class="up animated bag">
        <view class="text span">{{ Data.button_name ? "商家入驻" : Data.button_name }}
          </view>
      </view>
    </view>
    <!-- 底部按钮 -->
    <view class="bottom_btn" style="width:100%" catchtap="toGoods" data-id="{{Data.goods_id}}">
      <button type="button">立即抢购</button>
    </view>
  </view>
</view>