<navbar home back text="使用优惠券"></navbar>
<view style="height:{{navigationBarHeight}} "></view>
<view class='box'>
  <view class="container page" wx:if="{{data.merchantVoList}}">
    <view class="coupon_detail clearfix">
      <view class="fl wmfl">
        <image src="{{data.coverImg}}" mode='aspectFill' />
      </view>
      <view class="fr">
        <text class="title">{{data.title}}</text>
        <view class="time">{{data.subTitle}}</view>
        <view class="money">
          <text wx:if="{{data.type == 8&&data.price == data.couponPrice}}">￥{{data.couponPrice/100}}</text>
          <text wx:if="{{data.type == 8&&data.price != data.couponPrice}}">￥{{data.salePrice/100}}</text>
          <text wx:if="{{data.type != 8}}">￥{{data.couponPrice/100}}</text>
          <del>￥{{data.price/100}}</del>
          <text class="refund" wx:if="{{data.autoRefund == 1}}">
            <text>过期不退款</text>
          </text>
        </view>
      </view>
    </view>
    <view class="timevalidity" wx:if="{{data.validStatus != 0}}">
      <text>有效期至：</text>
      <text>{{expiredTime}}</text>
    </view>
    <view class="timevalidity" wx:if="{{data.validStatus == 0}}">
      <text>有效期:</text>
      <text>{{data.type==10?pickStartDate:validStartDate}}</text>
      <i>至</i>
      <text>{{data.type==10?pickEndDate:validEndDate}}</text>
    </view>
    <view></view>
    <view wx:if="{{data.usePrice!=undefined}}" class="manjian">满{{data.usePrice/100}}元可用</view>
    <view wx:if="{{data.usePrice==undefined}}" class="manjian">仅限本店使用</view>
    <image class='line' mode="widthFix" src="{{topLine}}"></image>
    <view class="zhuangtai">
      <image wx:if="{{data.couponOrderStatus==1}}" src="{{wm01Url}}" mode='widthFix'></image>
      <image wx:if="{{data.couponOrderStatus==2}}" src="{{wm02Url}}" mode='widthFix'></image>
      <image wx:if="{{data.couponOrderStatus==3}}" src="{{wm03Url}}" mode='widthFix'></image>
      <image wx:if="{{data.couponOrderStatus==0&&data.validStatus==0}}" src="{{wm04Url}}" mode='widthFix'></image>
      <view class="panel" wx:if="{{data.couponOrderStatus==0&&data.validStatus!=0}}">
        <!-- <view class="qrcode">
          <canvas canvas-id="qrcode" />
        </view> -->
        <view class="canWrap">
          <canvas canvas-id="qrcode" style="width: 1200rpx; height: 800rpx;" />
        </view>
        <image src="{{tempFilePath}}" mode="aspectFit" />
        <view class="closeRq" wx:if="{{showhieRq}}" bindtap="setRq">
          <image class="updataRqCode" mode='widthFix' src="{{upDataRqUrlF}}"></image>
          <view class="upDataRq">点一点刷新二维码</view>
        </view>

        <view class="coedTiem" wx:if="{{!showhieRq&&expiredSeconds>1}}">二维码在
          <text style="color:red">{{expiredSeconds}}s</text>
          后失效
        </view>

        <view class="barnum">
          <view class="barnumtext">{{showIdFalg?code:codeS}}</view>
          <image class="barnumImg" src="../../../assets/images/password.png" bindtap="showId"></image>
        </view>
      </view>
    </view>
    <!-- 适用门店 -->
    <store merchantVoList="{{data.merchantVoList}}"></store>
    <!-- <shop wx:if="{{mallList.length>0}}" mallList="{{mallList}}"></shop> -->
    <!-- <view class='applyshop'>适用门店</view>
    <view class='posi' style='overflow:{{hidden}};height:{{height}}'>
      <view class='posi_logo' wx:for="{{data.merchantVoList}}" wx:key="index">
        <view bindtap='gotoDetail' data-id='{{item.id}}'>
          <image src='{{item.merchantImgUrl}}'></image>
        </view>
        <view bindtap='gotoDetail' data-id='{{item.id}}'>
          <view class='name'>{{item.merchantName}}</view>
          <view class='shopVoList'>
            <view wx:for="{{item.shopVoList}}" wx:key="index" wx:for-item="itemName">
              <text>{{itemName.buildingName}}{{itemName.floorName}}--{{itemName.shopNumber}}</text>
              <text class='douhao' wx:if="{{item.shopVoList.length>1}}">,</text>
            </view>
          </view>
        </view>
        <image wx:if="{{item.linkLinePhone}}" bindtap='phone' data-merchantLinkPhone='{{item.linkLinePhone}}' class="tel" src="{{teljpgUrl}}" mode="widthFix" />
      </view>
    </view>
    <view class='bottom' bindtap='more' wx:if="{{showMore}}">{{more}}</view> -->

    <image class='line' mode="widthFix" src="{{btomLine}}"></image>
    <view class='note'>
      <view style='height:60rpx;line-height:60rpx;'>
        <text class="shiji">实付金额:</text>
        <text class='moneys'>{{data.couponPrice/100}}</text>
        <text style='font-size:24rpx;text-align:right;color: #FF4949;'>元</text>
      </view>
      <view wx:if="{{data.couponOrderStatus==0}}">
        <text>下单时间:</text>
        <text>{{createDate}}</text>
      </view>
      <view wx:if="{{data.couponOrderStatus==1}}">
        <text>核销时间:</text>
        <text>{{updateDate}}</text>
      </view>
      <view wx:if="{{data.couponOrderStatus==2}}">
        <text>过期时间:</text>
        <text>{{updateDate}}</text>
      </view>
      <view wx:if="{{data.couponOrderStatus==3}}">
        <text>退款时间:</text>
        <text>{{updateDate}}</text>
      </view>
      <view>
        <text>订单编号:</text>
        <text>{{data.orderId}}</text>
      </view>
      <!-- <view><text>手机号</text><text>2018.05.25</text></view> -->
    </view>
    <view class='notes' style="border-bottom:0">
      <view>
        <text>购买须知</text>
      </view>
      <view wx:if="{{data.contentType==0}}">
        <text><text class='spot'></text>{{data.remark}}</text>
      </view>
      <view wx:if="{{data.contentType==1}}">
        <rich-text nodes="{{curHtml}}"></rich-text>
      </view>
    </view>
  </view>
  <view class='game' bindtap="gotogame" wx-if="{{showIf}}">
    <view class='game-entry'>
      <image src="{{newUrl}}" class='gameimg' mode='widthFix'></image>
    </view>
  </view>
</view>