<!-- <navbar back home text="{{barTitle}}" background='#fff'></navbar> -->
<!--  style="margin-top:{{navigationBarHeight}} " -->
<view tt:if="{{showPage}}">
  <!-- <view ></view> -->
  <!-- 券的详情页面 -->
  <view class='coupons'>
    <view class="coupons-body">
      <view tt:if="{{coverPicture.length>0}}" class="banner" style="{{mouldType==1?'height: 750rpx;':''}}">
        <swiper class="index-slide swiper-box" style="{{mouldType==1?'height: 750rpx;':''}}" bindchange="swiperChange"
          indicator-dots="true" circular="false" current="{{swiperCurrent}}">
          <block tt:for="{{coverPicture}}" tt:key="unique">
            <swiper-item>
              <image data-data="{{item}}" src="{{item}}" class="index-slide-image"
                style="{{mouldType==1?'height: 750rpx;':''}}" />
            </swiper-item>
          </block>
        </swiper>
        <!-- <view class="dots">
          <block tt:for="{{coverPicture}}" tt:key="unique">
            <view class="dot{{index == swiperCurrent ? ' active' : ''}}"></view>
          </block>
        </view> -->
      </view>

      <view class='coupons_info' style='position:relative;z-index:9'>
        <!-- <view class='fenxiang' tt:if="{{data.type!=50&&data.type!=51}}" bindtap='showshare'
          tt:if="{{data.sendType!=3}}">
          <image src='{{fenxiang}}' mode="widthFix"></image>
          <text class='gift'>分享</text>
        </view> -->
        <view>
          <view class='distance' tt:if="{{data.targetAd==2&&data.endTime!=undefined||data.type==10}}">
            <view style='text-align:center;display:inline-block;'>
              <image class='clock' src='{{clockUrl}}' mode='widthFix' tt:if="{{data.type!=10}}"></image>
              <image class='clock' src='{{yushouUrl}}' mode='widthFix' tt:if="{{data.type==10}}"></image>
              <text class="qiang" tt:if="{{data.activityStatus!=0}}">距结束 :</text>
              <text class="qiang" tt:if="{{data.activityStatus==0}}">距开始 :</text>
            </view>
            <view tt:if="{{clock=='00'||data.status==1}}" class='times'>
              已经结束
            </view>
            <view tt:if="{{clock!='00'}}" class='times'>
              <view style="display:inline-block;" tt:if="{{day!=0}}">
                <text>{{day}}</text>天:
              </view>
              <text>{{hour}}</text>:
              <text>{{min}}</text>:
              <text>{{sec}}</text>
            </view>
          </view>
          <text class='title'>{{data.title}}<text class="elecard" tt:if="{{data.type==100}}">电子卡</text></text>



          <!-- 预购 -->
          <view class="moneyBox" tt:if="{{data.type==10}}">
            <view class="earnest">定金：</view>
            <view class="earnestNum">¥ {{salePriceStr}}</view>
            <view class="final">尾款抵扣：</view>
            <view class="earnestNum">¥ {{priceStr}}</view>
          </view>
          <view class="pickFinal_Box" tt:if="{{data.type==10}}">
            <view class="earnest">提货尾款：</view>
            <view class="earnestNum">¥ {{tailPriceStr}}</view>
            <view class="original">{{origPriceStr}}</view>
          </view>
          <view class="earnestTime time" tt:if="{{data.type==10}}"> 预购时间：{{validStartDate}}至{{validEndDate}}</view>

          <view class="finalTime time" tt:if="{{data.type==10}}">提货时间：{{pickStartDate}}至{{pickEndDate}}</view>
          <!-- 预售 -->

          <view class='salePriceStr clearfix' tt:if="{{data.type!=10}}">
            <text class='rmb'>¥</text>
            <view class="fl" tt:if="{{data.type!=8}}">
              <text class="pri01" tt:if="{{data.type!=50&&data.type!=51}}">{{priceAndStockObj.salePrice/100}}</text>
              <view class="pri01" tt:if="{{data.type==50||data.type==51}}">{{priceAndStockObj.creditPrice}}
                <text class='jifen'>积分</text>
              </view>

              <text class='throgh'
                tt:if="{{data.unit==0&&data.type!=50&&data.type!=51}}">{{priceAndStockObj.price/100}}元</text>
              <text tt:if="{{data.unit==1&&data.type!=50&&data.type!=51}}">{{priceAndStockObj.price/100}}小时</text>

            </view>
            <view class="fl" tt:if="{{data.type==8}}">

              <text class="pri01">{{priceAndStockObj.salePrice/100}}</text>
              <text class='presslimit' tt:if="{{data.type==8}}"><text>{{data.pressLimitNum+'人可砍至底价'}}</text></text>
              <text class='throgh'>{{priceAndStockObj.price/100}}元</text>

            </view>
            <view class="sellBox">
              {{'已售'+(priceAndStockObj.inventory-priceAndStockObj.remainInventory)+'|'+'库存'+priceAndStockObj.remainInventory}}
            </view>
          </view>

          <!-- <view class="subTitleBox">
            <text class="subTitle">{{data.subTitle}}</text>
           
          </view> -->

        </view>
      </view>
      <!-- 适用门店 -->
      <view class="childBox">
        <view class="childItem" tt:for="{{data.giftCouponList}}" bindtap="gochild" data-id="{{item.id}}"
          tt:key="{{index}}">
          <image class="childImg" mode='aspectFill' src="{{item.coverImg}}"></image>
          <view class="childName">{{item.title}}</view>
          <view class="childMoney">¥{{item.priceStr}}</view>
        </view>
      </view>

      <vieW class="groupTitleBox">
        <view class="groupTitle" tt:if="{{data.itemGroup.length>0}}">餐饮搭配</view>
        <view class="groupTitle" tt:if="{{data.Description.length>0}}">商品描述</view>
      </vieW>

      <view class="groupTextBox" tt:if="{{data.itemGroup.length>0}}" tt:for="{{data.itemGroup}}">

        <view class="groupTitleS">{{item.group_name}}</view>
        <view class="groupDetailsBox" tt:for="{{item.item_list}}" tt:for-item="itemChi">
          <view class="groupTiemBox">
            <view class="yuandian"></view>
            <view class="groupTiemName">{{itemChi.name}}（{{itemChi.count}}份）</view>
            <view class="groupTiemPay">¥{{itemChi.price/100}}</view>
          </view>
        </view>
      </view>

      <view class="groupTextBox" tt:if="{{data.Description.length>0}}" tt:for="{{data.Description}}">
        <view class="groupTitleS">{{item}}</view>
      </view>


      <!-- 适用门店 -->
      <!-- <store merchantVoList="{{merchantVoList}}" tt:if="{{data.type!=12}}"></store> -->

      <shop tt:if="{{mallList.length>0}}" mallList="{{mallList}}"></shop>

      <view class='notes'>
        <view class="notesH">购买须知</view>
        <view class="timeText">有效期</view>
        <view class="Hchild">• {{validStartDate}}至{{validEndDate}}</view>
        <view class="timeText">可用时间</view>
        <view class="Hchild">• 商家营业时间内到店使用</view>
        <view class="Hchild" tt:if="{{data.can_no_use_date.weekend}}">• 周末不支持使用</view>
        <view class="Hchild" tt:if="{{data.can_no_use_date.HolidaysFlag}}">• 节假日（元旦、春节、清明、劳动节、端午节、中秋节、国庆节、情人节、圣诞节）不支持使用
        </view>

        <view class="timeText">购买限制</view>
        <view class="Hchild">• 每个用户限购{{data.useLimitQuantity}}单</view>

        <view class="timeText">预约消费</view>
        <view class="Hchild" tt:if="{{!data.subscribeSing}}">• 无需预约，高峰时段可能等位</view>
        <view class="Hchild" tt:if="{{data.subscribeSing}}">• {{data.subscribeSing}}</view>


        <view class="timeText" tt:if="{{data.rec_person_num_max}}">适用人数</view>
        <view class="Hchild" tt:if="{{data.rec_person_num_max}}">• 该团购劵最多{{data.rec_person_num_max}}人使用</view>

        <view class="timeText">温馨提示</view>
        <view class="Hchild">• 团购券不支持配送或外卖</view>
        <view class="Hchild" tt:if="{{data.pack}}">• 该团购商品{{data.pack=='false'?'不支持':'支持'}}打包</view>
        <view class="Hchild" tt:if="{{data.besides}}">• {{data.besides=="false"?'不可以':'可以'}}外带餐食</view>

        <view class="Hchild" tt:if="{{data.superimposed_discounts}}">•
          {{data.superimposed_discounts=="false"?'不可以':'可以'}}享受店内其他优惠</view>
        <view class="Hchild" tt:if="{{data.private_room}}">• {{data.private_room=="false"?'不可以使用':'可以使用'}}包间</view>

        <view class="notesH">使用规则</view>
        <text tt:if="{{curHtml==''}}" class="notesText">{{data.remark}}</text>
        <view tt:if="{{curHtml!=''}}">
          <rich-text nodes="{{curHtml}}"></rich-text>
        </view>

        <view tt:if="{{data.curLsit}}" tt:for="{{data.curLsit}}" tt:key="{{index}}">
          <view class="timeText" tt:if="{{item.title!=''}}">{{item.title}}</view>
          <text class="Hchild">{{item.content}}</text>
        </view>
      </view>

      <view tt:if="{{couponList.length!=0}}"
        style="color: #333;letter-spacing: 0;font-size: 30rpx;height: 70rpx;line-height: 70rpx;margin-left: 35rpx;font-weight: bold;">
        其他活动
      </view>
      <view class='couponsL clearfix'>
        <c-coupons tt:if="{{couponList.length!=0}}" tt:for="{{couponList}}" from="fromMerchant" paramAtoB="{{loading}}"
          tt:key="unique" data="{{item}}" list="{{couponList}}" />
      </view>
      <view class='detailImg' tt:if="{{detailPicture.length>0}}">
        <image tt:for="{{detailPicture}}" tt:key="{{index}}" tt:for-item="item" src='{{item}}' mode='widthFix'></image>
      </view>
    </view>

    <form data-type='{{data.type}}' report-submit='true' tt:if="{{mouldType!=1}}">
      <view class="buy-view app-border-top" style="position:fixed;z-index:{{zIndex}};">
        <button class='goback' bindtap='goback'>
          <image src='{{homeSelectedO}}' mode="widthFix"></image>
          <text class='btnTxt'>首页</text>
        </button>
        <button bindtap="gotopay" disabled='{{showbutton}}' hover-class='active' class='buy'
          tt:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100!=0&&priceAndStockObj.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">
          <text class='txt'>{{priceAndStockObj.salePrice/100}}元</text>马上购买</button>
        <button tt:if="{{data.type==11&&priceAndStockObj.remainInventory!=0}}" bindtap="gohome"
          data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="2"
          class="home">配送到家
        </button>
        <button tt:if="{{data.type==11&&priceAndStockObj.remainInventory!=0}}" bindtap="gohome"
          data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="1"
          class="arrive">到店自提
        </button>
        <button bindtap="gotopay" disabled='{{showbutton}}' class='buy'
          tt:if="{{data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100==0&&priceAndStockObj.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</button>

        <button bindtap="gotopay" disabled='{{showbutton}}' class='buy' data-type='{{data.type}}'
          tt:if="{{data.type==51&&priceAndStockObj.remainInventory!=0||data.type==50&&priceAndStockObj.remainInventory!=0}}">马上兑换</button>
        <button class='buy buyHr' disabled='true'
          tt:if="{{data.sendType!=3&&(priceAndStockObj.remainInventory==0&&endtime!='活动已结束'||priceAndStockObj.remainInventory==0&&data.type==8)}}">已售罄</button>
        <button class='buy' disabled='true'
          tt:if="{{priceAndStockObj.remainInventory==0&&data.type==50||priceAndStockObj.remainInventory==0&&data.type==51}}">已兑完</button>
        <button class='buy' disabled='true' tt:if="{{endtime=='活动已结束'&&data.activityStatus!=0}}">活动已结束</button>
        <button class='buy' disabled='true' tt:if="{{total_micro_second<=0&&data.activityStatus!=0}}">活动已结束</button>
        <button id='noBuy' disabled='true' tt:if="{{data.activityStatus==0}}">活动未开始</button>
      </view>
    </form>

    <form data-type='{{data.type}}' report-submit='true' tt:if="{{mouldType==1}}">
      <view class="app-border-topX" style="position:fixed;z-index:{{zIndex}}; bottom: 0;">
        <view class="biaoz">{{data.type!=50?'¥':''}}</view>
        <view class="selling">{{data.type==50?priceAndStockObj.creditPrice+'积分':priceAndStockObj.salePrice/100}} </view>
        <view class="qsOriginal">¥{{priceAndStockObj.price/100}}</view>

        <button bindtap="gotopay" disabled='{{showbutton}}' hover-class='active' class='buyX'
          tt:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100!=0&&priceAndStockObj.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">
          马上购买</button>
        <button tt:if="{{data.type==11&&priceAndStockObj.remainInventory!=0}}" bindtap="gohome"
          data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="2"
          class="home">配送到家
        </button>
        <button tt:if="{{data.type==11&&priceAndStockObj.remainInventory!=0}}" bindtap="gohome"
          data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="1"
          class="arrive">到店自提
        </button>
        <button bindtap="gotopay" disabled='{{showbutton}}' class='buyX'
          tt:if="{{data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100==0&&priceAndStockObj.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</button>

        <button bindtap="gotopay" disabled='{{showbutton}}' class='buyX' data-type='{{data.type}}'
          tt:if="{{data.type==51&&priceAndStockObj.remainInventory!=0||data.type==50&&priceAndStockObj.remainInventory!=0}}">马上兑换</button>
        <button class='buyX buyHr' disabled='true'
          tt:if="{{data.sendType!=3&&(priceAndStockObj.remainInventory==0&&endtime!='活动已结束'||priceAndStockObj.remainInventory==0&&data.type==8)}}">已售罄</button>
        <button class='buyX' disabled='true'
          tt:if="{{priceAndStockObj.remainInventory==0&&data.type==50||priceAndStockObj.remainInventory==0&&data.type==51}}">已兑完</button>
        <button class='buyX' disabled='true' tt:if="{{endtime=='活动已结束'&&data.activityStatus!=0}}">活动已结束</button>
        <button class='buyX' disabled='true' tt:if="{{total_micro_second<=0&&data.activityStatus!=0}}">活动已结束</button>
        <button id='buyX' disabled='true' tt:if="{{data.activityStatus==0}}">活动未开始</button>
        <!-- <view class="sell">已售出<span class="sellP">{{data.inventory-priceAndStockObj.remainInventory}}</span>件</view> -->
        <button class="serviceBox" open-type="contact">
          <view class="fuwuLogoBox f">
            <image class="itemLogo" src="../../../assets/images/service1.png" />
          </view>
        </button>
      </view>
    </form>
  </view>

  <view tt:if="{{priceAndStockObj.remainInventory!=0&&data.type==8}}" class="btns clearfix" hover-class="none"
    hover-stop-propagation="false">
    <button class='goback' bindtap='goback'>
      <image src='{{homeSelectedO}}' mode="widthFix"></image>
      <text class='btnTxt'>首页</text>
    </button>
    <form report-submit='true' class="fl">
      <button bindtap="gotopay" style='background:transparent;color:#fff;' data-discount='discount1'
        disabled='{{showbutton}}'>
        <text>¥{{priceAndStockObj.price/100}}</text>
        <text>立即购买</text>
      </button>
    </form>
    <form bindsubmit="inviteFriend" report-submit='true' class="fr">
      <button form-type="submit"
        style='background:{{!showbutton1?"transparent":"#ccc"}};color:#fff;font-size:32rpx;line-height:94rpx;border-radius:60rpx;'
        disabled='{{showbutton1}}'>
        发起砍价
      </button>
    </form>
  </view>

  <!-- 问卷调查 -->
  <view class="b1"
    style="opacity:{{opacity}};display: {{display}};position: fixed;top:{{navigationBarHeight}};bottom: 0px;left: 0px;right: 0px;background: rgba(0, 0, 0, 0.8);overflow: hidden;z-index: 13;"
    animation="{{queueData}}">
    <view id='con' class='con'>
      <image class='wmclose' mode='widthFix' src="{{closedUrl}}" bindtap="closeQuestion"></image>
      <image class='ques_gou' mode='widthFix' src="{{quesGouUrl}}"></image>
      <image class='image' src="{{headbgUrl}}" mode='widthFix'></image>
      <image class='img image' src="{{quesBgUrl}}" mode='widthFix'></image>
      <view class='question'>
        <text class='titles'>{{questionnaire.title}}</text>
        <!-- 单选 -->
        <radio-group class="radio-group" tt:if="{{questionnaire.flag=='single'}}" data-flags="single"
          bindchange="formSubmit" data-questionId="{{questionId}}">
          <label class="radios" tt:for="{{questionnaire.answers}}" tt:key="{{index}}">
            <radio value="{{item.id}}" checked="{{item.checked}}" />{{item.name}}
          </label>
        </radio-group>
        <!-- 多选 -->
        <checkbox-group bindchange="checkboxChange" tt:if="{{questionnaire.flag=='multi'}}">
          <label class="radio ques" tt:for="{{questionnaire.answers}}" tt:key="index">
            <checkbox value="{{item.id}}" />{{item.name}}
          </label>
        </checkbox-group>
        <view class='ques btnss' tt:if="{{questionnaire.flag=='multi'}}" data-flags='multi' bindtap='formSubmit'
          data-questionId="{{questionId}}">确定</view>
      </view>
    </view>
  </view>
  <!-- 卡转赠领取弹出框 -->
  <view class='shaddow' tt:if='{{showCardOffer}}'></view>
  <view class='alert-box' tt:if='{{showCardOffer}}'>
    <view class='user-img'>
      <image src='{{cardData.avatarUrl}}'></image>
    </view>
    <view class='close' bindtap='closeAlert'>
      <image src='{{close02}}'></image>
    </view>
    <view class='a-title' tt:if='{{!isSamePeople&&isReceived}}'>{{cardData.userName}}</view>
    <view class='a-title' tt:if='{{!isSamePeople&&!isReceived}}'>{{cardData.userName+'送您一张消费卡'}}</view>
    <view class='a-title' tt:if='{{isSamePeople&&!isReceived}}'>等待好友领取</view>
    <view class='a-title' tt:if='{{isSamePeople&&isReceived}}'>{{cardData.userName}}</view>
    <view class='a-img'>
      <image src='{{cardData.coverImg}}'></image>
      <view class='a-received' tt:if="{{isReceived}}">{{statusText}}</view>
    </view>
    <button type="primary" tt:if='{{!isSamePeople&&!isReceived}}' disabled='{{receivedDisabled}}'
      class='support-tansfer' bindtap='checkPhoneStatus'>领取</button>
    <button type="primary" tt:if='{{isSamePeople||isReceived}}' class='support-tansfer' bindtap='closeAlert'>关闭</button>
  </view>
  <!-- 分享弹框 -->
  <!-- <c-shareposter  bind:myevent="" class="business" couponChannelId="{{data.id}}" tt:if="{{isshowposter}}"/> -->
  <!-- 分享弹框 -->
  <view class='modal' tt:if="{{isshowposter}}" bindtap='hidemodal'>
    <view class='modal-content'>
      <view>
        <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>
        <image src='./../../../assets/images/wechat.png' mode='aspectFit'></image>
        <text>微信好友</text>
      </view>
      <view bindtap='showPoster'>
        <image src='./../../../assets/images/picture.png' mode='aspectFit'></image>
        <text>生成海报</text>
      </view>
    </view>
  </view>
  <!-- <view class="shootBox" tt:if="{{spuIdObj.lastStatus==4}}">
    <button class="mount" open-type="share"  data-channel="video">
      <image src="../../../assets/images/shoot.png"  class="videoCla"/>
      <view class="issue">发布视频</view>
    </button>
  </view> -->
  <phoen showBox="{{showBox}}" bind:hiePhoen="setPhone" bind:heiBox="setBox" />
</view>