<navbar home back text="订单详情"></navbar>
<view style="height:{{navigationBarHeight}} "></view>
<view class='order' wx:if="{{showPage}}">
  <view wx:if="{{order.orderStatus==1}}" class='tips'>
    <image class='success' src='{{succUrl}}' mode='widthFix'></image>
    <view wx:if="{{order.salePrice/100==0}}" class='msg'>
      <text>交易成功</text>
      <!-- <text>请尽快到门店使用，有效期至{{}}</text> -->
    </view>
    <view wx:if="{{order.salePrice/100!=0}}" class='msg'>
      <text>付款成功</text>
      <!-- <text>请尽快到门店使用，有效期至{{}}</text> -->
    </view>
  </view>
  <view class='section'>
    <view class='sectionTit'>
      <text>{{order.title}}</text>
    </view>
    <view class='detail_msg'>
      <view class='logo'>
        <image mode='aspectFill' src='{{order.coverImg}}'></image>
      </view>
      <view class='info'>
        <view>
          <text>{{order.subTitle}}</text>
        </view>
        <view>
          <text>下单时间：</text>{{createDate}}
        </view>
      </view>
    </view>
  </view>
  <view class='classif'>
    <!-- 
      couponOrderStatus
      0 未使用
      1 已使用
      2 已过期
      3 已经退款
     -->
    <!-- 
       orderStatus
       1
       只有支付完成的时
       才显示兑换码
      -->
    <view wx:if="{{order.orderStatus==1&&order.type!=100&&order.type!=5&&order.type!=51}}" data-couponOrderStatus="{{order.couponOrderStatus}}" data-title="{{order.title}}" data-subtitle="{{order.subTitle}}" data-remark="{{order.remark}}" data-quancode="{{order.couponOrderId}}" data-validstatus="{{order.validStatus}}" bindtap="powerDrawer" class='dhCode'>
      <view style="width:86%;clear: both;">
        <text class="fl">兑换码：</text>
        <text class="fr" wx:if="{{order.validStatus!=0}}">{{showIdFalg?order.couponOrderId:order.couponOrderIdS}}</text>
        <image class="barnumImg" src="../../../assets/images/password.png" catchtap="showId"></image>
      </view>
      <view>
        <image class="spcode" src="{{spcodeUrl}}" mode='widthFix'></image>
        <image class="rArrow" src="{{chevronUrl}}" mode='widthFix'></image>
      </view>
    </view>
    <!-- <view>
      <text>下单时间</text>
      <text class='fr'>{{createDate}}</text>
    </view> -->
    <view class='dhCode'>
      <text class='bianhao'>订单编号：</text>
      <text>{{order.orderNumber}}</text>
    </view>
    <view class='wuliu' wx:if="{{order.type==11}}">
      <text class='left'>物流状态：</text>
      <text class="right">{{(order.shippingStatus==10||order.shippingStatus==14)?"待自提":order.shippingStatus==15?"已自提":order.shippingStatus==20?"待发货":order.shippingStatus==24?"待收货":order.shippingStatus==25?"已收货":""}}</text>
    </view>
    <view class='wuliu' wx:if="{{order.shippingType==2&&order.deliveryInfo}}">
      <text class='left'>物流公司：</text>
      <text class="right">{{order.deliveryInfo.courierInput}}</text>
    </view>
    <view class='wuliu' wx:if="{{order.shippingType==2&&order.deliveryInfo}}">
      <text class='left'>快递单号：</text>

      <view class="left">{{order.deliveryInfo.expressageIdInput}}</view>

      <view class="copeCode" bindtap="copeCode" data-text="{{order.deliveryInfo.expressageIdInput}}">复制</view>
      <text class="goInquire" bindtap="gokuaidi" data-nu="{{order.deliveryInfo.expressageIdInput}}">查询物流</text>
    </view>

    <!-- <view>
      <text wx:if="{{order.type == 8}}">原价</text>
      <text wx:if="{{order.type != 8}}">面额</text>
      <text class="jine1" wx:if="{{order.unit==0}}">{{order.price/100}}元</text>
      <text class="jine1" wx:if="{{order.unit==1}}">{{order.price/100}}小时</text>
    </view> -->
    <view style="overflow: hidden; padding-left: 5%;padding-right: 5%;height: 96rpx;line-height: 96rpx;">
      <text class='left'>实付金额：</text>
      <view class='right'>
        <text class='RMB'>¥</text>
        <text class='jine'>{{order.payment/100}}</text>
      </view>
    </view>
  </view>
  <!-- 适用门店 -->
  <!-- <store merchantVoList="{{order.merchantVoList}}" wx:if="{{order.type!=12}}"></store> -->
  <shop wx:if="{{mallList.length>0}}" mallList="{{mallList}}"></shop>
  <!-- 子券列表 -->
  <view class="childList" wx:if="{{order.type==12}}">
    <view class="childTitle">礼券：</view>
    <view class="childItme" wx:for="{{order.giftCouponList}}" wx:key="{{item}}">

      <view class="chaildDetBox">
        <image mode='aspectFill' class="chaildImg" src="{{item.coverImg}}"></image>
        <view class="childDataBox">
          <view class="orderName">{{item.title}}</view>
          <view class="childPriceStr">面额：{{item.priceStr}}元</view>
        </view>
      </view>
    </view>
  </view>
  <!-- 待付款 显示立即购买的按钮 -->
  <view wx:if="{{(order.orderStatus==0&&order.salePrice!=0)||(order.orderStatus==7&&order.salePrice!=0)}}" class="buy-view app-border-top">
    <button bindtap='orderFunc' hover-class='active' data-couponChannelId="{{orderFlag?order.composeOrderId:order.id}}" disabled='{{showButton}}' class='buy'>立即支付</button>
  </view>
  <view class='game' bindtap="gotogame" wx-if="{{showIf&&order.orderStatus!=0}}">
    <view class='game-entry'>
      <image src="{{newUrl}}" class='gameimg' mode='widthFix'></image>
    </view>
  </view>
  <button type="primary" open-type="share" wx:if="{{order.type == 100 && supportTransfer==1&&cardIf}}" class='support-tansfer'>
    <image src="{{weixinTitle}}" class='share' mode="widthFix"></image>转赠给微信好友
  </button>
  <view class="sign" wx:if="{{order.couponOrderStatus == 0 &&order.type == 11 && order.shippingType == 2 && order.shippingStatus== 24}}" bindtap="setShow">签收</view>
</view>
<view class="showT" wx:if="{{showFlag}}" bindtap="hieShow">
  <view class="titleBxo">
    <view class="text">是否确认收到商品？</view>
    <view class="p">签收后将完成订单</view>
    <view class="btnBox">
      <view class="le" bindtap="verify">确认签收</view>
      <view class="ri" bindtap="hieShow">取消</view>
    </view>
  </view>
</view>