<view>
  <auth wx:if="{{!userInfo}}" bind:getAuth="getAuth"></auth>
  <bonusTips wx:if="{{tipsFlag}}" tipsDatas="{{tipsDatas}}" bind:closeTips="closeTips"></bonusTips>
  <view class="person_header">
    <view class="card">
      <image class="card_bg" src="../../image/person/card_bg.png"></image>
      <view class="card_content">
        <view class="card_title">红包余额</view>
        <view class="bonus_balance">
          <text class="f34 mr10">¥</text>{{bonus_total}}</view>
        <view class="mt30">
          <text class="bonus_balance_detail" bindtap='skip_bonus_rule'>红包使用规则></text>
        </view>
      </view>
      <image class="hand_out_bonus" bindtap="handOutBonus" src="../../image/person/hand_out_bonus.png"></image>
    </view>
  </view>


  <view class="person_info">
    <block wx:if="{{userInfo.nickName}}">
      <image src="{{userInfo.avatarUrl}}" class='person_avatar_image'></image>
      <text class='person_name'>{{userInfo.nickName}}</text>
    </block>
    <block wx:else>
      <navigator url='/pages/login/login'>
        <image src="../../image/mine_logo_icon.png" class='person_avatar_image'></image>
        <text class='person_name'>请登录</text>
      </navigator>
    </block>
  </view>

  <view class="order_list">
    <view class='order_title flex_1px_d' bindtap='skip_all_order'>
      <text>我的订单</text>
      <text class='look_all_order arrow_right' decode="{{true}}">查看全部订单&nbsp;</text>
    </view>

    <view class='order_info'>
      <view>
        <navigator url="/pages/order_tabs/orderTabs?state_type=state_new" hover-class="none" class="pos_rel">
          <image style='width:35rpx;height: 35rpx;' src='../../image/person/payments_due_icon.png'></image>
          <view class="mt8">
            <text>待付款</text>
          </view>
          <view class="sub_count" wx:if="{{pre_pay_count}}">{{pre_pay_count}}</view>
        </navigator>
      </view>
      <view>
        <navigator url="/pages/order_tabs/orderTabs?state_type=state_pay" hover-class="none" class="pos_rel">
          <image style='width:35rpx;height: 35rpx;' src='../../image/person/shipping_term_icon.png'></image>
          <view class="mt8">
            <text>待发货</text>
          </view>
          <view class="sub_count" wx:if="{{pre_send_count}}">{{pre_send_count}}</view>
        </navigator>
      </view>
      <view>
        <navigator url="/pages/order_tabs/orderTabs?state_type=state_send" hover-class="none" class="pos_rel">
          <image style='width:35rpx;height: 35rpx;' src='../../image/person/goods_receipt_icon.png'></image>
          <view class="mt8">
            <text>待收货</text>
          </view>
          <view class="sub_count" wx:if="{{pre_receive_count}}">{{pre_receive_count}}</view>
        </navigator>
      </view>
      <view>
        <navigator url="/pages/order_tabs/orderTabs?state_type=state_success" hover-class="none" class="pos_rel">
          <image style='width:35rpx;height: 35rpx;' src='../../image/person/evaluated_icon.png'></image>
          <view class="mt8">
            <text>已收货</text>
          </view>
          <view class="sub_count" wx:if="{{evaluate_count}}">{{evaluate_count}}</view>
        </navigator>
      </view>
      <view bindtap='refund'>
        <image style='width:35rpx;height: 35rpx;' src='../../image/person/refund_terms_icon.png'></image>
        <view class="mt8">
          <text>退款/售后</text>
        </view>
      </view>
    </view>
  </view>

  <view class="order_list">
    <navigator url="/pages/address/address">
      <view class='order_title flex_1px_d'>
        <text>收货地址</text>
        <text class='look_all_order arrow_right' decode="{{true}}">{{addr_num}}&nbsp;</text>
      </view>
    </navigator>
    <navigator url="/pages/fcode/fcode">
      <view class='order_title flex_1px_d'>
        <text>我的F码</text>
        <text class='look_all_order arrow_right'></text>
      </view>
    </navigator>
    <view class='order_title flex_1px_d' bindtap='skip_help'>
      <text>帮助中心</text>
      <text class='look_all_order arrow_right' decode="{{true}}"></text>
    </view>

    <!-- <view class='order_title' bindtap="shareBonus">
      <text>测试红包</text>
      <text class='look_all_order arrow_right' decode="{{true}}"></text>
    </view> -->
  </view>

</view>