<view class="container page">
  <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>￥{{data.salePrice/100}}</text>
        <del>￥{{data.price/100}}</del>
        <text wx:if="{{data.usePrice!=undefined}}" class="manjian">满{{data.usePrice/100}}元可用</text>
        <text wx:if="{{data.usePrice==undefined}}" class="manjian">仅限本店使用</text>
      </view>
    </view>
  </view>
  <view class="timevalidity">
    <text>有效期至：</text>
    <text>{{expiredTime}}</text>
  </view>
  <image class='line' mode="widthFix" src="./../../../assets/img/line.png"></image>
  <view class="zhuangtai">
    <image wx:if="{{data.couponOrderStatus==1}}" src="./../../../assets/img/wm01.jpg" mode='widthFix'></image>
    <image wx:if="{{data.couponOrderStatus==2}}" src="./../../../assets/img/wm02.jpg" mode='widthFix'></image>
    <image wx:if="{{data.couponOrderStatus==3}}" src="./../../../assets/img/wm03.jpg" mode='widthFix'></image>
    <view class="panel" wx:if="{{data.couponOrderStatus==0}}">
      <view class="barcode">
        <canvas canvas-id="barcode" />
      </view>
      <view class="qrcode">
        <canvas canvas-id="qrcode" />
      </view>
      <view class="barnum buy">
        <text>优惠券码：</text>{{code}}</view>
    </view>
  </view>

  <view class="posi">
    <view class="tit">
      适用门店
    </view>
    <view wx:for="{{data.merchantVoList}}" wx:key="{{index}}">
      <view class='posi_logo'>
        <view>
          <image src='{{item.merchantImgUrl}}'></image>
        </view>
        <view>
          <text>{{item.merchantName}}</text>
          <text>{{item.addr}}{{item.buildingName}}{{item.floorName}}</text>
        </view>
        <view  bindtap='phone' data-merchantLinkPhone='{{item.merchantLinkPhone}}'>
          <image  class="tel" src="./../../../assets/img/tel.jpg" mode="widthFix" />
        </view>
      </view>
    </view>
  </view>

  <image class='line' mode="widthFix" src="./../../../assets/img/line.png"></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>
      <text><text class='spot'></text>{{data.remark}}</text>
    </view>
  </view>
</view>
<view class='game' bindtap="gotogame" wx-if="{{showIf}}">
  <view class='game-entry'> 
    <image src="./../../../assets/img/new.png" class='gameimg' mode='widthFix'></image>
  </view>
</view>