
<!--pages/order/quasi.wxml-->
<view class="quasi">
  <view wx:if="{{info}}" class="weui-panel weui-panel_address ">
    <view  class="weui-panel__bd ">
      <navigator wx:if="{{info.receiver_addr_id}}" url="/pages/address/select?callback=callbackAddress&id={{info.receiver_addr_id}}" class="weui-media-box weui-media-box_text weui-cell__ft_in-access weui-media-box_address">
        <view class="weui-media-box__title weui-media-box__title_in-text">{{info.receiver}} {{info.receiver_phone}}</view>
        <view class="weui-media-box__desc">
          {{info.receiver_addr}}
        </view>
      </navigator>
      <navigator wx:else url="/pages/address/select?callback=callbackAddress" class=" weui-media-box weui-media-box_text weui-cell__ft_in-access weui-media-box_address primary-color text-large">
        选择收货地址
      </navigator>
    </view>
  </view>
  <view class="weui-cells">
    <view class="weui-cell weui-cell_access">
      <view class="weui-cell__bd">支付方式</view>
      <view class="">在线支付</view>
    </view>

    <navigator url="/pages/mine/coupon?id={{info.user_coupon_id}}&callback=callbackCoupon" wx:if="{{info.user_coupon_id}}" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
      <view class="weui-cell__bd">红包</view>
      <view class="weui-cell__ft_in-access">¥{{info.coupon_money}}</view>
    </navigator>
    <view wx:else class="weui-cell weui-cell_access">
      <view class="weui-cell__bd">红包</view>
      <view class="weui-cell__ft">暂无可用</view>
    </view>
  </view>

  <view class="quasi-goods">
    <view class="quasi-goods__hd">
      <image class="quasi-goods__img" src="/images/shop-512.png"></image>
      {{info.seller_name}}
    </view>
    <view class="quasi-goods__bd">
      <view class="quasi-goods__list">
        <view wx:for="{{info.goods}}" wx:key="{{index}}" class="quasi-goods__item">
          <view class="quasi-goods__item-name">{{item.goods_name}}</view>
          <view class="quasi-goods__item-num">x{{item.num}}</view>
          <view class="quasi-goods__item-price">¥{{item.price_sum}}</view>
        </view>
      </view>
      <view class="quasi-goods__list">
        <view wx:if="{{info.packing_fee > 0}}" class="quasi-goods__item">
          <view class="quasi-goods__item-name">餐盒费</view>
          <view class="quasi-goods__item-num"></view>
          <view class="quasi-goods__item-price">¥{{info.packing_fee}}</view>
        </view>
        <view class="quasi-goods__item">
          <view class="quasi-goods__item-name">配送费</view>
          <view class="quasi-goods__item-num"></view>
          <view class="quasi-goods__item-price">¥{{info.delivery_fee}}</view>
        </view>
      </view>
      <view wx:if="{{info.cut_money > 0}}" class="quasi-goods__list">
        <view class="quasi-goods__item">
          <view class="quasi-goods__item-name quasi-goods__item-name_grey">
          <image class="quasi-goods__item-name-icon" src="/images/icon_jian.png"></image>商城优惠
          </view>
          <view class="quasi-goods__item-num"></view>
          <view class="quasi-goods__item-price">-¥{{info.cut_money}}</view>
        </view>
      </view>
      <view class="quasi-goods__list">
        <view class="quasi-goods__item">
          <view class="quasi-goods__item-name quasi-goods__item-name_grey">
            总计¥{{info.order_price}} <text wx:if="{{info.cut_money_total > 0}}">优惠¥{{info.cut_money_total}}</text>
          </view>
          <view class="quasi-goods__item-num"></view>
          <view class="quasi-goods__item-price primary-color">
            实付 ¥{{info.pay_price}}
          </view>
        </view>
      </view>
    </view>
  </view>

  <view class="weui-cells">
    <navigator url="./content?callback=callbackContent&content={{content}}" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
      <view class="weui-cell__bd weui-cell__bd_content">备注</view>
      <view>{{content}}</view>
      <view class="weui-cell__ft weui-cell__ft_in-access">{{content ? '' : '口味, 偏好等要求'}}</view>
    </navigator>
  </view>

</view>
<view class="quasi-actions">
  <view class="quasi-actions__cut">已优惠¥{{info.cut_money_total}}</view>
  <view class="quasi-actions__pay">
    待支付
    <text class="primary-color">¥{{info.pay_price}}</text>
  </view>
  <button bindtap="onAddOrder" loading="{{loading}}" disabled="{{disabled || loading}}" class="weui-btn menu-cart__btn" type="primary">
    提交订单
  </button>
</view>