<!-- 券的详情页面 -->
<view class='coupons'>
  <view class="coupons-body">
    <view class='banner'>
      <image src='{{data.coverImg}}'></image>
    </view>
    <view class='coupons_info'>
      <view class='fenxiang'>
        <image class="fenxiang" src='./../../../assets/img/fenxiang.png' mode="widthFix"></image>
        <button class='share user-motto' data-id='{{data.id}}' data-couponId='{{data.couponId}}' data-title='{{data.title}}' id="shareBtn" open-type="share" hover-class="other-button-hover"></button>
      </view>
      <view>
        <view class='distance' wx:if="{{data.targetAd==2&&data.endTime!=undefined&&data.type!=5}}">
          <view style='text-align:center;display:inline-block;'>
            <image class='clock' src='./../../../assets/img/clock.png' mode='widthFix'></image>
            <text class="qiang">距结束还剩 :</text>
          </view>
          <view wx:if="{{clock=='已经截止'||data.remainInventory==0||data.status==1}}" class='times'>
            <text>{{day}}</text>天
            <text>{{hour}}</text>:
            <text>{{min}}</text>:
            <text>{{sec}}</text>
          </view>
          <view wx:if="{{clock!='已经截止'&&data.remainInventory!=0}}" class='times'>
            <text>{{day}}</text>天
            <text>{{hour}}</text>:
            <text>{{min}}</text>:
            <text>{{sec}}</text>
          </view>
        </view>
        <text class='title'>{{data.title}}</text>
        <text class="subTitle">{{data.subTitle}}</text>
        <view class='salePriceStr clearfix'>
          <view class="fl">售价:
            <text class="pri01">{{data.salePriceStr}}</text>
            <text class="yuan">元</text>
            <text class='throgh' wx:if="{{data.unit==0}}">{{data.priceStr}}元</text>
            <text  wx:if="{{data.unit==1}}">{{data.priceStr}}小时</text>
          </view>
          <text class="restNum fr">剩余<text>{{data.remainInventory}}件</text></text>
        </view>


        <view class='rest' wx:if="{{data.validType==2}}">有效期:自领取之日起
          <text class='time'>{{validDays}}</text>天内有效</view>
        <view class='rest' wx:if="{{data.validType==1}}">有效期：
          <text class='time'>{{validStartDate}}至{{validEndDate}}</text>
        </view>
        <view class='rest' wx:if="{{data.type==5}}">
          <text class='time'>当次有效</text>
        </view>
        <view class='rest' wx:if="{{data.type==1}}">
          <text class='txt01'>使用条件：</text>
          <text class='time'>满{{data.usePriceStr}}元可用</text>
        </view>
        <view class='rest'>
          <text class='txt01'>限购条件：</text>
          <text class='time'>每人{{data.useLimitQuantity}}张</text>
        </view>
      </view>
    </view>
    <view class='posi'>
      <view class='posi_logo'>
        <view>
          <image src='{{data.merChantImgUrl}}'></image>
        </view>
        <view>
          <text>{{data.merchantName}}</text>
          <text>{{data.addr}}{{data.buildingName}}{{data.floorName}}</text>
        </view>
        <image bindtap='phone' class="tel" src="./../../../assets/img/tel.jpg" mode="widthFix" />
      </view>
    </view>
    <view class='notes'>
      <view>
        <text>购买须知</text>
      </view>
      <view>
        <text><text class='spot'></text>{{data.remark}}</text>
      </view>
    </view>
  </view>
  <view class="buy-view app-border-top">
    <button bindtap='orderFunc' hover-class='active' class='buy' wx:if="{{data.salePriceStr!=0&&data.remainInventory!=0&&endtime!='活动已结束'}}">
      <text class='txt'>{{data.salePriceStr}}元</text>马上购买</button>
    <button bindtap='orderFunc' class='buy' wx:if="{{data.salePriceStr==0&&data.remainInventory!=0&&endtime!='活动已结束'}}">免费领取</button>
    <button class='buy' wx:if="{{data.remainInventory==0&&endtime!='活动已结束'}}" style="background:#999;color: #fff;">已售罄</button>
    <button class='buy' wx:if="{{endtime=='活动已结束'}}" style="background:#999;color: #fff;">活动已结束</button>
    <button class='buy' wx:if="{{total_micro_second<=0}}" style="background:#999;color: #fff;">活动已结束</button>
  </view>
</view>
<!-- 问卷调查 -->
<questionnaire  questionnaire="{{questionnaire}}" bind:myevent="" />